Skip to content

Commit e6d9e25

Browse files
committed
Readme updated
1 parent b2d683a commit e6d9e25

File tree

1 file changed

+36
-6
lines changed

1 file changed

+36
-6
lines changed

README.md

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
Build status [![Scala CI](https://github.com/gmkumar2005/scala-js-env-playwright/actions/workflows/scala.yml/badge.svg)](https://github.com/gmkumar2005/scala-js-env-playwright/actions/workflows/scala.yml)
2-
1+
[![Scala CI](https://github.com/gmkumar2005/scala-js-env-playwright/actions/workflows/scala.yml/badge.svg)](https://github.com/gmkumar2005/scala-js-env-playwright/actions/workflows/scala.yml)
32
# scala-js-env-playwright
43
A JavaScript environment for Scala.js (a JSEnv) running playwright
54
## Usage
65
Add the following line to your `project/plugins.sbt`
76
```scala
87
// For Scala.js 1.x
9-
libraryDependencies += "io.github.gmkumar2005" %% "scala-js-env-playwright" % "0.1.2-SNAPSHOT"
8+
libraryDependencies += "io.github.gmkumar2005" %% "scala-js-env-playwright" % "0.1.8"
109
```
1110
Add the following line to your `build.sbt`
1211
```scala
@@ -17,18 +16,45 @@ Test / jsEnv := new PWEnv(
1716
)
1817
```
1918
## Avoid trouble
20-
* This is a very early version. It is not yet published to maven central. You need to clone this repo and do a `sbt publishLocal` to use it.
19+
* This is a very early version. It may not work for all projects. It is tested on chrome/chromium and firefox.
20+
* Few test cases are failing on webkit. Keep a watch on this space for updates.
2121
* It works only with Scala.js 1.x
2222
* Make sure the project is set up to use ModuleKind.ESModule in the Scala.js project.
2323
```scala
2424
// For Scala.js 1.x
2525
scalaJSLinkerConfig ~= { _.withModuleKind(ModuleKind.ESModule) }
2626
```
27-
* Some projects which may need to use both Selenium and Playwright may run into google execption. To resolve this, add the following line to your `plugins.sbt`
27+
* Some projects which may need to use both Selenium and Playwright. If it runs into google exception, add the following line to your `plugins.sbt`
2828
```scala
2929
libraryDependencies += "com.google.guava" % "guava" % "33.0.0-jre"
3030
```
3131

32+
## Supported browsers
33+
* chrome
34+
* chromium (same as chrome)
35+
* firefox
36+
* webkit (experimental)
37+
38+
## Compatibility notes
39+
### Scala versions
40+
* This library can be used with any scala version 2.x and 3.x
41+
* This project is compiled with scala 2.12.18
42+
### sbt versions
43+
* This library can be used with any sbt version 1.x
44+
### Playwright versions
45+
* This library can be used with playwright version 1.40.0 `"com.microsoft.playwright" % "playwright" % "1.40.0"`
46+
### JDK versions
47+
* This library is tested on JDK11 and JDK21
48+
49+
## Default configuration
50+
```scala
51+
jsEnv := new jsenv.playwright.PWEnv(
52+
browserName = "chrome",
53+
headless = true,
54+
showLogs = false,
55+
)
56+
```
57+
3258
## KeepAlive configuration
3359
```scala
3460
lazy val pwenvConfig = Def.setting {
@@ -45,14 +71,18 @@ jsEnv := new jsenv.playwright.PWEnv(
4571
)
4672

4773
```
74+
75+
## Wiki
76+
Watch this space for more details on how to use this library.
77+
4878
## References
4979
* Sample project using this JSEnv: https://github.com/gmkumar2005/scalajs-sbt-vite-laminar-chartjs-example
5080

5181
## Todo
5282
* Add examples to demonstrate how to use LaunchOptions
5383
* ~~Add feature to keepAlive the browser~~
5484
* Optimize to use a single browser instance for all tests by creating multiple tabs
55-
* Configure github actions to test this project
85+
* ~~Configure github actions to test this project~~
5686
* Configure github actions to publish to maven central
5787
* Verify debug mode works
5888
* Verify other test frameworks work

0 commit comments

Comments
 (0)