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,7 +279,10 @@ class BaseCase(unittest.TestCase):
time.sleep(0.06)
element = self.wait_for_element_visible(
selector, by=by, timeout=timeout)
element.clear()
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)