You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For more options of the PhantomJS environment, see
70
70
[the Scaladoc of `PhantomJSEnv`]({{ site.production_url }}/api/sbt-scalajs-env-phantomjs/1.0.0/org/scalajs/jsenv/phantomjs/sbtplugin/PhantomJSEnvPlugin$$autoImport$.html).
71
71
72
+
## Playwright
73
+
[Playwright](https://playwright.dev/) is a comprehensive testing library, enabling automation of Chromium, Firefox, and WebKit browsers.
74
+
75
+
It supports multiple platforms and languages, including Mobile Web, making it an optimal choice for testing JavaScript in real browser environments.
76
+
77
+
[`scala-js-env-playwright`](https://github.com/gmkumar2005/scala-js-env-playwright) is an independent project that offers a `JSEnv` that uses Playwright for JavaScript execution.
78
+
79
+
The playwright-based `jsEnv` can be enabled by adding the following settings in `build.sbt`
80
+
```scala
81
+
jsEnv :=newPWEnv(
82
+
browserName ="chrome",
83
+
headless =true,
84
+
showLogs =true
85
+
)
86
+
```
87
+
Addtionally it requires the following line in `project/plugins.sbt`:
Copy file name to clipboardExpand all lines: doc/tutorial/basic/index.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -351,7 +351,7 @@ After reloading, you can invoke `run` successfully:
351
351
[info] Running tutorial.webapp.TutorialApp
352
352
[success] (...)
353
353
354
-
Alternatively to Node.js with jsdom, you can use [Selenium](http://docs.seleniumhq.org/).
354
+
Alternatively to Node.js with jsdom, you can use [Selenium](http://docs.seleniumhq.org/) or [Playwright](https://github.com/gmkumar2005/scala-js-env-playwright)
355
355
You can find more information about this in the [documentation about JavaScript environments]({{ BASE_PATH }}/doc/project/js-environments.html).
0 commit comments