Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions docs/playwright.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ It's readable and simple and working using Playwright API!
To start you need CodeceptJS with Playwright packages installed

```bash
npm install codeceptjs playwright@^0.10.0 --save
npm install codeceptjs playwright@^0.11.1 --save
```

Or see [alternative installation options](http://codecept.io/installation/)
Expand All @@ -52,7 +52,8 @@ Make sure `Playwright` helper is enabled in `codecept.conf.js` config:
helpers: {
Playwright: {
url: "http://localhost",
show: true
show: true,
browser: 'chromium'
}
}
// ..
Expand All @@ -75,6 +76,7 @@ When to consider navigation succeeded, defaults to `load`. Given an array of eve
Playwright: {
url: "http://localhost",
show: true,
browser: 'chromium',
waitForNavigation: "networkidle0"
}
}
Expand All @@ -87,7 +89,7 @@ It will wait for a small amount of time (100ms) by default after each user actio

## Writing Tests

CodeceptJS test should be created with `gt` command:
Additional CodeceptJS tests should be created with `gt` command:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is 1 test created by the generator, which seems to be the suggested setup flow.


```sh
npx codeceptjs gt
Expand All @@ -110,7 +112,7 @@ Tests consist with a scenario of user's action taken on a page. The most widely

> ℹ All actions are listed in [Playwright helper reference](http://codecept.io/helpers/Playwright/).*

All actions which interact with elements **support CSS and XPath locators**. Actions like `click` or `fillField` by locate elements by their name or value on a page:
All actions which interact with elements can use **[CSS or XPath locators](https://codecept.io/locators/#css-and-xpath)**. Actions like `click` or `fillField` can locate elements by their name or value on a page:

```js
// search for link or button
Expand Down