From 3bf52d0ce76b116748f4d0d6901fb6f7b8d568b6 Mon Sep 17 00:00:00 2001 From: Arjun Attam Date: Fri, 24 Jan 2020 10:10:41 -0800 Subject: [PATCH] update faqs --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3e5e42eb57..e37a893d42 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ Playwright can be used to create a browser instance, open pages, and then manipu #### Page screenshot -This code snippet navigates to thismachine.info in Chromium, Firefox and WebKit, and saves 3 screenshots. +This code snippet navigates to whatsmyuseragent.org in Chromium, Firefox and WebKit, and saves 3 screenshots. ```js const pw = require('playwright'); @@ -47,7 +47,7 @@ const pw = require('playwright'); browsers.forEach(async browserName => { const browser = await pw[browserName].launch(); const context = await browser.newContext(); - const page = await context.newPage('http://thismachine.info/'); + const page = await context.newPage('http://whatsmyuseragent.org/'); await page.screenshot({ path: `example-${browserName}.png` }); await browser.close(); @@ -135,6 +135,10 @@ Check out our [contributing guide](https://github.com/microsoft/playwright/blob/ ## FAQ +**Q: Can I use a single API to automate different browsers?** + +Yes, you can. See [Browser](https://github.com/microsoft/playwright/blob/master/docs/api.md#class-browser) in the API reference for the common set of APIs across Chromium, Firefox and WebKit. A small set of features are specific to browsers, for example see [ChromiumBrowser](https://github.com/microsoft/playwright/blob/master/docs/api.md#class-chromiumbrowser). + **Q: How does Playwright relate to [Puppeteer](https://github.com/puppeteer/puppeteer)?** Puppeteer is a Node library which provides a high-level API to control Chrome or Chromium over the DevTools Protocol. Puppeteer project is active and is maintained by Google.