Skip to content

Commit e89fe16

Browse files
authored
Merge pull request #3816 from zeezephyr/patch-2
Note for Playwright about unsupported browsers on some operating systems
2 parents 64e32c3 + 6328c6f commit e89fe16

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

src/content/5/en/part5d.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,38 @@ The installation script will ask a few questions, answer them as follows:
5454

5555
![answer: javascript, tests, false, true](../../images/5/play0.png)
5656

57+
Note that when installing Playwright your operating system may not support all of the browsers Playwright offers and you may see an error message like below:
58+
```
59+
Webkit 18.0 (playwright build v2070) downloaded to /home/user/.cache/ms-playwright/webkit-2070
60+
Playwright Host validation warning:
61+
╔══════════════════════════════════════════════════════╗
62+
║ Host system is missing dependencies to run browsers. ║
63+
║ Missing libraries: ║
64+
║ libicudata.so.66 ║
65+
║ libicui18n.so.66 ║
66+
║ libicuuc.so.66 ║
67+
║ libjpeg.so.8 ║
68+
║ libwebp.so.6 ║
69+
║ libpcre.so.3 ║
70+
║ libffi.so.7 ║
71+
╚══════════════════════════════════════════════════════╝
72+
```
73+
If this is the case you can either specify specific browsers to test with `--project=` in your _package.json_:
74+
75+
```js
76+
"test": "playwright test --project=chromium --project=firefox",
77+
```
78+
79+
or remove the entry for any problematic browsers from your _playwright.config.js_ file:
80+
```js
81+
projects: [
82+
// ...
83+
//{
84+
// name: 'webkit',
85+
// use: { ...devices['Desktop Safari'] },
86+
//},
87+
```
88+
5789
Let's define an npm script for running tests and test reports in _package.json_:
5890

5991
```js

0 commit comments

Comments
 (0)