Better exception-handling with element.clear() in update_text()

This commit is contained in:
Michael Mintz 2019-11-04 01:00:16 -05:00
parent f91ac1878c
commit 0505937e31
1 changed files with 4 additions and 1 deletions

View File

@ -279,9 +279,12 @@ class BaseCase(unittest.TestCase):
time.sleep(0.06)
element = self.wait_for_element_visible(
selector, by=by, timeout=timeout)
try:
element.clear()
except Exception:
pass # Clearing the text field first isn't critical
except Exception:
pass # Clearing the text field first isn't critical
self.__demo_mode_pause_if_active(tiny=True)
pre_action_url = self.driver.current_url
try: