Skip to content

Commit b7bc809

Browse files
committed
Add a pair of highlight methods
1 parent 9e255a4 commit b7bc809

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

seleniumbase/fixtures/base_case.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -955,6 +955,16 @@ def bring_to_front(self, selector, by=By.CSS_SELECTOR):
955955
% selector)
956956
self.execute_script(script)
957957

958+
def highlight_click(self, selector, by=By.CSS_SELECTOR,
959+
loops=2, scroll=True):
960+
self.highlight(selector, by=by, loops=loops, scroll=scroll)
961+
self.click(selector, by=by)
962+
963+
def highlight_update_text(self, selector, new_value, by=By.CSS_SELECTOR,
964+
loops=2, scroll=True):
965+
self.highlight(selector, by=by, loops=loops, scroll=scroll)
966+
self.update_text(selector, new_value, by=by)
967+
958968
def highlight(self, selector, by=By.CSS_SELECTOR,
959969
loops=settings.HIGHLIGHTS, scroll=True):
960970
""" This method uses fancy JavaScript to highlight an element.

0 commit comments

Comments
 (0)