Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2a43511

Browse files
authored
💡 Add comments with instructions for Playwright screenshot scripts (#12193)
1 parented66d70 commit2a43511

File tree

6 files changed

+18
-1
lines changed

6 files changed

+18
-1
lines changed

‎scripts/playwright/request_form_models/image01.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@
88
# Run playwright codegen to generate the code below, copy paste the sections in run()
99
defrun(playwright:Playwright)->None:
1010
browser=playwright.chromium.launch(headless=False)
11-
context=browser.new_context()
11+
# Update the viewport manually
12+
context=browser.new_context(viewport={"width":960,"height":1080})
1213
page=context.new_page()
1314
page.goto("http://localhost:8000/docs")
1415
page.get_by_role("button",name="POST /login/ Login").click()
1516
page.get_by_role("button",name="Try it out").click()
17+
# Manually add the screenshot
1618
page.screenshot(path="docs/en/docs/img/tutorial/request-form-models/image01.png")
1719

1820
# ---------------------

‎scripts/playwright/separate_openapi_schemas/image01.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@
33
fromplaywright.sync_apiimportPlaywright,sync_playwright
44

55

6+
# Run playwright codegen to generate the code below, copy paste the sections in run()
67
defrun(playwright:Playwright)->None:
78
browser=playwright.chromium.launch(headless=False)
9+
# Update the viewport manually
810
context=browser.new_context(viewport={"width":960,"height":1080})
911
page=context.new_page()
1012
page.goto("http://localhost:8000/docs")
1113
page.get_by_text("POST/items/Create Item").click()
1214
page.get_by_role("tab",name="Schema").first.click()
15+
# Manually add the screenshot
1316
page.screenshot(
1417
path="docs/en/docs/img/tutorial/separate-openapi-schemas/image01.png"
1518
)

‎scripts/playwright/separate_openapi_schemas/image02.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@
33
fromplaywright.sync_apiimportPlaywright,sync_playwright
44

55

6+
# Run playwright codegen to generate the code below, copy paste the sections in run()
67
defrun(playwright:Playwright)->None:
78
browser=playwright.chromium.launch(headless=False)
9+
# Update the viewport manually
810
context=browser.new_context(viewport={"width":960,"height":1080})
911
page=context.new_page()
1012
page.goto("http://localhost:8000/docs")
1113
page.get_by_text("GET/items/Read Items").click()
1214
page.get_by_role("button",name="Try it out").click()
1315
page.get_by_role("button",name="Execute").click()
16+
# Manually add the screenshot
1417
page.screenshot(
1518
path="docs/en/docs/img/tutorial/separate-openapi-schemas/image02.png"
1619
)

‎scripts/playwright/separate_openapi_schemas/image03.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@
33
fromplaywright.sync_apiimportPlaywright,sync_playwright
44

55

6+
# Run playwright codegen to generate the code below, copy paste the sections in run()
67
defrun(playwright:Playwright)->None:
78
browser=playwright.chromium.launch(headless=False)
9+
# Update the viewport manually
810
context=browser.new_context(viewport={"width":960,"height":1080})
911
page=context.new_page()
1012
page.goto("http://localhost:8000/docs")
1113
page.get_by_text("GET/items/Read Items").click()
1214
page.get_by_role("tab",name="Schema").click()
1315
page.get_by_label("Schema").get_by_role("button",name="Expand all").click()
16+
# Manually add the screenshot
1417
page.screenshot(
1518
path="docs/en/docs/img/tutorial/separate-openapi-schemas/image03.png"
1619
)

‎scripts/playwright/separate_openapi_schemas/image04.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@
33
fromplaywright.sync_apiimportPlaywright,sync_playwright
44

55

6+
# Run playwright codegen to generate the code below, copy paste the sections in run()
67
defrun(playwright:Playwright)->None:
78
browser=playwright.chromium.launch(headless=False)
9+
# Update the viewport manually
810
context=browser.new_context(viewport={"width":960,"height":1080})
911
page=context.new_page()
1012
page.goto("http://localhost:8000/docs")
1113
page.get_by_role("button",name="Item-Input").click()
1214
page.get_by_role("button",name="Item-Output").click()
1315
page.set_viewport_size({"width":960,"height":820})
16+
# Manually add the screenshot
1417
page.screenshot(
1518
path="docs/en/docs/img/tutorial/separate-openapi-schemas/image04.png"
1619
)

‎scripts/playwright/separate_openapi_schemas/image05.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@
33
fromplaywright.sync_apiimportPlaywright,sync_playwright
44

55

6+
# Run playwright codegen to generate the code below, copy paste the sections in run()
67
defrun(playwright:Playwright)->None:
78
browser=playwright.chromium.launch(headless=False)
9+
# Update the viewport manually
810
context=browser.new_context(viewport={"width":960,"height":1080})
911
page=context.new_page()
1012
page.goto("http://localhost:8000/docs")
1113
page.get_by_role("button",name="Item",exact=True).click()
1214
page.set_viewport_size({"width":960,"height":700})
15+
# Manually add the screenshot
1316
page.screenshot(
1417
path="docs/en/docs/img/tutorial/separate-openapi-schemas/image05.png"
1518
)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2026 Movatter.jp