File tree Expand file tree Collapse file tree 6 files changed +18
-1
lines changed
Expand file tree Collapse file tree 6 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 88# Run playwright codegen to generate the code below, copy paste the sections in run()
99def run (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 # ---------------------
Original file line number Diff line number Diff line change 33from playwright .sync_api import Playwright , sync_playwright
44
55
6+ # Run playwright codegen to generate the code below, copy paste the sections in run()
67def run (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 )
Original file line number Diff line number Diff line change 33from playwright .sync_api import Playwright , sync_playwright
44
55
6+ # Run playwright codegen to generate the code below, copy paste the sections in run()
67def run (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 )
Original file line number Diff line number Diff line change 33from playwright .sync_api import Playwright , sync_playwright
44
55
6+ # Run playwright codegen to generate the code below, copy paste the sections in run()
67def run (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 )
Original file line number Diff line number Diff line change 33from playwright .sync_api import Playwright , sync_playwright
44
55
6+ # Run playwright codegen to generate the code below, copy paste the sections in run()
67def run (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 )
Original file line number Diff line number Diff line change 33from playwright .sync_api import Playwright , sync_playwright
44
55
6+ # Run playwright codegen to generate the code below, copy paste the sections in run()
67def run (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 )
You can’t perform that action at this time.
0 commit comments