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
Copy file name to clipboardExpand all lines: README.md
+16-4Lines changed: 16 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,8 @@
12
12
13
13
## About
14
14
15
-
Playwright for PHP lets you launch real browsers (Chromium, Firefox, WebKit), drive pages and locators, and write reliable end‑to‑end tests — all from PHP.
15
+
Playwright for PHP lets you launch real browsers (Chromium, Firefox, WebKit), drive pages and locators, and write
- Choose a browser: `Playwright::chromium()`, `Playwright::firefox()`, or `Playwright::webkit()`.
80
88
-`Playwright::safari()` is an alias of `webkit()`.
81
-
- Common launch options: `headless` (bool), `slowMo` (ms), `args` (array of CLI args), and an optional `context` array with context options.
89
+
- Common launch options: `headless` (bool), `slowMo` (ms), `args` (array of CLI args), and an optional `context` array
90
+
with context options.
82
91
83
92
```php
84
93
$context = Playwright::webkit([
@@ -168,6 +177,7 @@ final class HomePageTest extends TestCase
168
177
```
169
178
170
179
Notes:
180
+
171
181
- The trait provides `$this->playwright`, `$this->browser`, `$this->context`, and `$this->page` properties.
172
182
- Call `setUpPlaywright()` in `setUp()` and `tearDownPlaywright()` in `tearDown()` for proper lifecycle management.
173
183
- Use `$this->expect($locator)` or `$this->expect($page)` for fluent assertions.
@@ -201,12 +211,14 @@ jobs:
201
211
```
202
212
203
213
Tips:
214
+
204
215
- Cache Node and Composer if you need faster builds.
205
216
- You can also cache Playwright browsers under `~/.cache/ms-playwright`.
206
217
207
218
## Contributing
208
219
209
-
Contributions are welcome. Please use Conventional Commits, include tests for behavior changes, and ensure docs/examples are updated when relevant. A typical first run inside the repository is:
220
+
Contributions are welcome. Please use Conventional Commits, include tests for behavior changes, and ensure docs/examples
221
+
are updated when relevant. A typical first run inside the repository is:
210
222
211
223
```bash
212
224
composer install # installs PHP deps and the bundled Playwright server
@@ -217,5 +229,5 @@ See `docs/contributing/testing.md` for more details on the local workflow.
217
229
218
230
## License
219
231
220
-
This package is released by the [Playwright PHP](https://playwright-php.dev)
232
+
This package is released by the [Playwright PHP](https://playwright-php.dev)
221
233
project under the MIT License. See the [LICENSE](LICENSE) file for details.
0 commit comments