File tree 2 files changed +7
-1
lines changed
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -43,18 +43,24 @@ def run(playwright: Playwright) -> None:
43
43
context = browser.new_context()
44
44
page = context.new_page()
45
45
page.goto(" https://playwright.dev/" )
46
+
47
+ # Tap into the search box and search "codegen"
46
48
page.get_by_role(" button" , name = " Search" ).click()
47
49
page.get_by_placeholder(" Search docs" ).fill(" codegen" )
50
+
51
+ # Select the correct docs link
48
52
page.locator(" #docsearch-item-0" ).get_by_role(" link" ,
49
53
name = " Running Codegen Test generator" ).click()
50
54
page.get_by_role(
51
55
" heading" , name = " Running CodegenDirect link to Running Codegen" ).click()
52
56
57
+ # The next page link is located in the bottom of the view
53
58
page.mouse.wheel(0 , 4000 )
54
59
55
60
# These sleeps help to slow down the UI interactions so you can see what's actually done during the run
56
61
time.sleep(2 )
57
62
page.locator(" .pagination-nav__link--next" ).click()
63
+
58
64
time.sleep(3 )
59
65
60
66
# ---------------------
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ Inspired by [Josh Branchaud](https://dev.to/jbranchaud/how-i-built-a-learning-ma
16
16
- [ Display Web Scraping Data with Pandas] ( /python/display-web-scraping-data-with-pandas.md )
17
17
- [ Scrape Data From an API Endpoint] ( /python/scrape-data-from-an-api-endpoint.md )
18
18
- [ Scrape Dynamic Data with Playwright] ( /python/scrape-dynamic-data-with-playwright.md )
19
- - [ Use Playwright Codegen to Automatically Record UI Interactions] ( python/user -playwright-codegen-to-automatically-record-ui-interactions.md )
19
+ - [ Use Playwright Codegen to Automatically Record UI Interactions] ( python/use -playwright-codegen-to-automatically-record-ui-interactions.md )
20
20
21
21
## CSS
22
22
You can’t perform that action at this time.
0 commit comments