Skip to content

Commit f7326aa

Browse files
committed
Update example tests
1 parent 36ab7c8 commit f7326aa

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

examples/raw_browser_launcher.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@
1010
page_actions.wait_for_element(driver, "4", "id").click()
1111
page_actions.wait_for_element(driver, "2", "id").click()
1212
page_actions.wait_for_text(driver, "42", "output", "id")
13-
js_utils.highlight_with_js(driver, "#output", 6, "")
13+
js_utils.highlight_with_js(driver, "#output", loops=6)
1414
finally:
1515
driver.quit()
1616

1717
# Example 2 using default args or command-line options
1818
driver = Driver()
1919
driver.get("https://seleniumbase.github.io/demo_page")
20-
js_utils.highlight_with_js(driver, "h2", 5, "")
20+
js_utils.highlight_with_js(driver, "h2", loops=5)
2121
by_css = "css selector"
2222
driver.find_element(by_css, "#myTextInput").send_keys("Automation")
2323
driver.find_element(by_css, "#checkBox1").click()
24-
js_utils.highlight_with_js(driver, "img", 5, "")
24+
js_utils.highlight_with_js(driver, "img", loops=5)
2525
driver.quit() # If the script fails early, the driver still quits

examples/raw_driver.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@
66
# Python Context Manager
77
with Driver() as driver: # By default, browser="chrome"
88
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)
1010

1111
with Driver() as driver: # Also accepts command-line options
1212
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)
1414
by_css = "css selector"
1515
driver.find_element(by_css, "#myTextInput").send_keys("Automation")
1616
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)
1818

1919
# Python Context Manager (with options given)
2020
with Driver(browser="chrome", incognito=True) as driver:
2121
driver.get("https://seleniumbase.io/apps/calculator")
2222
page_actions.wait_for_element(driver, "4", "id").click()
2323
page_actions.wait_for_element(driver, "2", "id").click()
2424
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

Comments
 (0)