Skip to content

Commit

Permalink
chore: don't use whatsmyuseragent.org anymore (#268)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt committed Jun 17, 2023
1 parent 268beb4 commit 402b9ca
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions frontend/src/examples/java/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default [
{
id: "webkit-screenshot",
title: "WebKit screenshot",
description: "This examples navigates to whatsmyuseragent.com and saves a screenshot to the disk using WebKit.",
description: "This examples navigates to playwright.dev and saves a screenshot to the disk using WebKit.",
code: codeWebKitScreenshot,
}, {
id: "evaluate-in-browser-context",
Expand All @@ -29,7 +29,7 @@ export default [
}, {
id: "page-screenshot",
title: "Screenshot on Chromium, Firefox, and WebKit",
description: "This example navigates to whatsmyuseragent.com and makes a screenshot in all three browsers.",
description: "This example navigates to playwright.dev and makes a screenshot in all three browsers.",
code: codePageScreenshot,
}, {
id: "print-title",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/examples/java/page-screenshot.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static void main(String[] args) {
try (Browser browser = browserType.launch()) {
BrowserContext context = browser.newContext();
Page page = context.newPage();
page.navigate("http://whatsmyuseragent.org/");
page.navigate("https://playwright.dev");
page.screenshot(new Page.ScreenshotOptions().setPath(Paths.get("screenshot-" + browserType.name() + ".png")));
}
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/examples/java/webkit-screenshot.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public static void main(String[] args) {
try (Playwright playwright = Playwright.create()) {
Browser browser = playwright.webkit().launch();
Page page = browser.newPage();
page.navigate("http://whatsmyuseragent.org/");
page.navigate("https://playwright.dev");
page.screenshot(new Page.ScreenshotOptions().setPath(Paths.get("example.png")));
}
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/examples/javascript/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default [
{
id: "page-screenshot",
title: "Page screenshot",
description: "This code snippet navigates to whatsmyuseragent.org in Chromium and WebKit, and saves 2 screenshots.",
description: "This code snippet navigates to playwright.dev in Chromium and WebKit, and saves 2 screenshots.",
code: codePageScreenshot,
}, {
id: "mobile-and-geolocation",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/examples/javascript/page-screenshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const playwright = require('playwright');
const browser = await browserType.launch();
const context = await browser.newContext();
const page = await context.newPage();
await page.goto('http://whatsmyuseragent.org/');
await page.goto('https://playwright.dev');
await page.screenshot({ path: `example-${browserType.name()}.png` });
await browser.close();
}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/examples/python/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ export default [
{
id: "screenshot-sync",
title: "Screenshot Sync",
description: "This example navigates to whatsmyuseragent.org and saves a screenshot of the page to the disk with the Sync API.",
description: "This example navigates to playwright.dev and saves a screenshot of the page to the disk with the Sync API.",
code: codeScreenshotSync,
},{
id: "screenshot-async",
title: "Screenshot with Async API",
description: "This example navigates to whatsmyuseragent.org and saves a screenshot of the page to the disk with the Async API.",
description: "This example navigates to playwright.dev and saves a screenshot of the page to the disk with the Async API.",
code: codeScreenshotAsync,
},
{
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/examples/python/screenshot-async.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ async def main():
async with async_playwright() as p:
browser = await p.chromium.launch()
page = await browser.new_page()
await page.goto("http://whatsmyuseragent.org/")
await page.goto("https://playwright.dev")
await page.screenshot(path="example.png")
await browser.close()

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/examples/python/screenshot-sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
with sync_playwright() as p:
browser = p.chromium.launch()
page = browser.new_page()
page.goto("http://whatsmyuseragent.org/")
page.goto("https://playwright.dev")
page.screenshot(path="example.png")
browser.close()

0 comments on commit 402b9ca

Please sign in to comment.