Skip to content

Commit da7361a

Browse files
committed
updated readme to remove auto-start option
1 parent 73fd994 commit da7361a

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

Readme.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ Most common config values are:
5353
* `browser` - either `chromium`, `firefox`, `webkit`
5454
* `show` - (default: `true`) to show browser or set to `false` to run tests in headless mode
5555
* `timeout` - (default: `5000`) timeout (in ms) for all Playwright operations
56-
* `pw_start` - (default: `true`) start Playwright Server (Proxy to CodeceptJS) automatically. Set to `false` and run server manually in case server doesn't start.
5756
* `pw_server` - (default: 'http://localhost:8191') url of Playwright Server
5857
* `pw_debug` - (default: `false`) print Playwright Server debug information
5958
* `video` - save video on fail
@@ -68,28 +67,29 @@ More configuration options are is listed on [CodeceptJS Playwright page](https:/
6867

6968
## Usage
7069

71-
Playwright module requires NodeJS server to be running. Playwright module will start it and stop automatically. Default port is **8191**.
70+
Playwright module requires NodeJS server to be running. Start the server manually:
7271

73-
If you want to disable automatic server start, set `start` option to `false`:
72+
```
73+
npx codeception-playwright-module
74+
```
75+
76+
If you want to start server automatically, use [RunProcess extension](https://codeception.com/extensions#RunProcess) from Codeception
7477

7578
```yaml
76-
modules:
79+
extensions:
7780
enabled:
78-
- Playwright:
79-
url: 'http://localhost'
80-
browser: 'chromium'
81-
show: true
82-
pw_start: false
81+
- Codeception\Extension\RunProcess:
82+
0: npx codeception-playwright-module
83+
sleep: 3 # wait 5 seconds for processes to boot
8384
```
8485

85-
In this case you can start the server manually:
86+
If you start server on different host or port, run port with `--port` option:
8687

87-
```bash
88-
npx codeception-playwright-module
8988
```
90-
Please check that server can be started with no issues.
89+
npx codeception-playwright-module --playwright 9999
90+
```
9191

92-
If you start server on different host or port, you can configure it:
92+
And pass port to config
9393

9494
```yaml
9595
modules:
@@ -98,7 +98,6 @@ modules:
9898
url: 'http://localhost'
9999
browser: 'chromium'
100100
show: true
101-
pw_start: false
102101
pw_server: http://otherhost:8191
103102
```
104103

@@ -116,6 +115,8 @@ Playwright-specific commands are also available in [CodeceptJS Playwright Helper
116115
$I->amOnPage('/');
117116
$I->click('#first .clickable');
118117
$I->dontSeeInTitle('Error');
118+
$I->fillField('Username', 'John');
119+
$I->fillField('Password', '1233456');
119120
$I->see('Hello, world!');
120121
```
121122

0 commit comments

Comments
 (0)