Installation Test
Installation Test
Create and save test.js in an editor with the following code:
const {webkit} = require('playwright');
(async () => {
const browser = await webkit.launch();
const page = await browser.newPage();
await page.goto('http://whatsmyuseragent.org/');
await page.screenshot({ path: `example.png` });
await browser.close();
})();
Execute the test file:
playwright_test > node test.js
Once the test is executed, you should see and example.png file on the playwright_test directory, with a screenshot from the http://whatsmyuseragent.org/ web page.