Skip to content

Commit d23176c

Browse files
authored
docs(readme): fixed old camel case function calls (#496)
1 parent ab6c0af commit d23176c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ async def main():
7777
async with async_playwright() as p:
7878
for browser_type in [p.chromium, p.firefox, p.webkit]:
7979
browser = await browser_type.launch()
80-
page = await browser.newPage()
80+
page = await browser.new_page()
8181
await page.goto('http://whatsmyuseragent.org/')
8282
await page.screenshot(path=f'example-{browser_type.name}.png')
8383
await browser.close()
@@ -164,7 +164,7 @@ async def main():
164164
async with async_playwright() as p:
165165
iphone_11 = p.devices["iPhone 11 Pro"]
166166
browser = await p.webkit.launch(headless=False)
167-
context = await browser.newContext(
167+
context = await browser.new_context(
168168
**iphone_11,
169169
locale="en-US",
170170
geolocation={"longitude": 12.492507, "latitude": 41.889938},
@@ -258,7 +258,7 @@ from playwright.async_api import async_playwright
258258
async def main():
259259
async with async_playwright() as p:
260260
browser = await p.chromium.launch()
261-
page = await browser.newPage()
261+
page = await browser.new_page()
262262

263263
async def log_and_continue_request(route, request):
264264
print(request.url)

0 commit comments

Comments
 (0)