|
6 | 6 | # Python Context Manager
|
7 | 7 | with Driver() as driver: # By default, browser="chrome"
|
8 | 8 | driver.get("https://google.com/ncr")
|
9 |
| - js_utils.highlight_with_js(driver, 'img[alt="Google"]', 6, "") |
| 9 | + js_utils.highlight_with_js(driver, 'img[alt="Google"]', loops=6) |
10 | 10 |
|
11 | 11 | with Driver() as driver: # Also accepts command-line options
|
12 | 12 | driver.get("https://seleniumbase.github.io/demo_page")
|
13 |
| - js_utils.highlight_with_js(driver, "h2", 5, "") |
| 13 | + js_utils.highlight_with_js(driver, "h2", loops=5) |
14 | 14 | by_css = "css selector"
|
15 | 15 | driver.find_element(by_css, "#myTextInput").send_keys("Automation")
|
16 | 16 | driver.find_element(by_css, "#checkBox1").click()
|
17 |
| - js_utils.highlight_with_js(driver, "img", 5, "") |
| 17 | + js_utils.highlight_with_js(driver, "img", loops=5) |
18 | 18 |
|
19 | 19 | # Python Context Manager (with options given)
|
20 | 20 | with Driver(browser="chrome", incognito=True) as driver:
|
21 | 21 | driver.get("https://seleniumbase.io/apps/calculator")
|
22 | 22 | page_actions.wait_for_element(driver, "4", "id").click()
|
23 | 23 | page_actions.wait_for_element(driver, "2", "id").click()
|
24 | 24 | page_actions.wait_for_text(driver, "42", "output", "id")
|
25 |
| - js_utils.highlight_with_js(driver, "#output", 6, "") |
| 25 | + js_utils.highlight_with_js(driver, "#output", loops=6) |
0 commit comments