From 6881db681741320196df2f7c15f8c9194b0e6cb8 Mon Sep 17 00:00:00 2001 From: Aarni Koskela Date: Fri, 4 Feb 2022 17:36:30 +0200 Subject: [PATCH] docs: fix typo in Python APIRequestContext example (#11861) `playwright.chromium` should be `p.chromium`, etc. --- docs/src/api/class-apirequestcontext.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/api/class-apirequestcontext.md b/docs/src/api/class-apirequestcontext.md index e40c8c0284..588d3c7205 100644 --- a/docs/src/api/class-apirequestcontext.md +++ b/docs/src/api/class-apirequestcontext.md @@ -71,13 +71,13 @@ with sync_playwright() as p: # This will launch a new browser, create a context and page. When making HTTP # requests with the internal APIRequestContext (e.g. `context.request` or `page.request`) # it will automatically set the cookies to the browser page and vise versa. - browser = playwright.chromium.launch() + browser = p.chromium.launch() context = browser.new_context(base_url="https://api.github.com") api_request_context = context.request page = context.new_page() # Alternatively you can create a APIRequestContext manually without having a browser context attached: - # api_request_context = playwright.request.new_context(base_url="https://api.github.com") + # api_request_context = p.request.new_context(base_url="https://api.github.com") # Create a repository.