# Support multiple js playwright scripts

**URL:** <https://discuss.elastic.co/t/support-multiple-js-playwright-scripts/368228>\
**Category:** Synthetics\
**Created:** [October 4, 2024, 3:33am UTC](https://discuss.elastic.co/t/support-multiple-js-playwright-scripts/368228 "2024-10-04T03:33:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![xyngfei](https://avatars.discourse-cdn.com/v4/letter/x/a88e57/32.png) [@xyngfei](https://discuss.elastic.co/u/xyngfei)\
**Post date:** [October 4, 2024, 3:33am UTC](https://discuss.elastic.co/t/support-multiple-js-playwright-scripts/368228/1 "2024-10-04T03:33:53Z")

</div>

Currently, we have the existing playwright script, however, it has several js files because we need to make the test more maintainable. Each js file is representing a feature testing,

featureA.js = search shopping cart  
featureB.js = add shopping cart

In this current design, how do I allow uploading multiple js files?

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/b/c/bcfda76ed378c29e5976b24b30084901f3253cf4.png)

---

<div class="post-metadata">

**Author:** ![vigneshshanmugam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vigneshshanmugam/32/40324_2.png) [@vigneshshanmugam](https://discuss.elastic.co/u/vigneshshanmugam)\
**Post date:** [October 4, 2024, 5:32am UTC](https://discuss.elastic.co/t/support-multiple-js-playwright-scripts/368228/2 "2024-10-04T05:32:16Z")

</div>

Hi @xyngfei ,

You would need to create a Synthetics project and set it up which would bundle all the files (featurea.js and featureb.js) and the relevant journey files.

Please have a look at the [setting up project monitors](https://www.elastic.co/guide/en/observability/current/synthetics-get-started-project.html#synthetics-get-started-project-init) documentation. Let us know if you need help.

Thanks,  
Vignesh

---

<div class="post-metadata">

**Author:** ![xyngfei](https://avatars.discourse-cdn.com/v4/letter/x/a88e57/32.png) [@xyngfei](https://discuss.elastic.co/u/xyngfei)\
**Post date:** [October 8, 2024, 1:30am UTC](https://discuss.elastic.co/t/support-multiple-js-playwright-scripts/368228/3 "2024-10-08T01:30:06Z")

</div>

@vigneshshanmugam  
Is there any boilerplate for beginners to get started on? so far, I only tried to use the recorder to copy the test script, and paste into the the textarea to try it out.

---

<div class="post-metadata">

**Author:** ![vigneshshanmugam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vigneshshanmugam/32/40324_2.png) [@vigneshshanmugam](https://discuss.elastic.co/u/vigneshshanmugam)\
**Post date:** [October 29, 2024, 7:38pm UTC](https://discuss.elastic.co/t/support-multiple-js-playwright-scripts/368228/4 "2024-10-29T19:38:16Z")

</div>

@xyngfei Missed this somehow, Yes you can setup a new synthetics project using the `init command` [Use the Synthetics CLI | Elastic Observability [8.15] | Elastic](https://www.elastic.co/guide/en/observability/current/synthetics-command-reference.html#elastic-synthetics-init-command)

You would need to pass in the Kibana URL and APiKey which will setup the monitors and run them on the configured public/private locations of your choice. Let us know if you need any help.

Thanks,  
Vignesh

---

<div class="post-metadata">

**Author:** ![xyngfei](https://avatars.discourse-cdn.com/v4/letter/x/a88e57/32.png) [@xyngfei](https://discuss.elastic.co/u/xyngfei)\
**Post date:** [November 25, 2024, 4:05am UTC](https://discuss.elastic.co/t/support-multiple-js-playwright-scripts/368228/5 "2024-11-25T04:05:46Z")

</div>

I found a good [example](https://github.com/elastic/synthetics-demo) to cut down the whole learning journey
