|
8 | 8 | driver.get("https://seleniumbase.github.io/") |
9 | 9 | js_utils.highlight_with_js(driver, 'img[alt="SeleniumBase"]', loops=6) |
10 | 10 |
|
| 11 | +with DriverContext(browser="chrome", incognito=True) as driver: |
| 12 | + driver.get("https://seleniumbase.io/apps/calculator") |
| 13 | + page_actions.wait_for_element(driver, "4", by="id").click() |
| 14 | + page_actions.wait_for_element(driver, "2", by="id").click() |
| 15 | + page_actions.wait_for_text(driver, "42", "output", by="id") |
| 16 | + js_utils.highlight_with_js(driver, "#output", loops=6) |
| 17 | + |
11 | 18 | with DriverContext() as driver: |
12 | 19 | driver.get("https://seleniumbase.github.io/demo_page") |
13 | 20 | js_utils.highlight_with_js(driver, "h2", loops=5) |
14 | 21 | by_css = "css selector" |
15 | 22 | driver.find_element(by_css, "#myTextInput").send_keys("Automation") |
16 | 23 | driver.find_element(by_css, "#checkBox1").click() |
17 | 24 | js_utils.highlight_with_js(driver, "img", loops=5) |
18 | | - |
19 | | -with DriverContext(browser="chrome", incognito=True) as driver: |
20 | | - driver.get("https://seleniumbase.io/apps/calculator") |
21 | | - page_actions.wait_for_element(driver, "4", by="id").click() |
22 | | - page_actions.wait_for_element(driver, "2", by="id").click() |
23 | | - page_actions.wait_for_text(driver, "42", "output", by="id") |
24 | | - js_utils.highlight_with_js(driver, "#output", loops=6) |
0 commit comments