Last active
August 31, 2018 02:27
-
-
Save converge/830367975963ddc0a047e3285e0d4f53 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fake_sleep(self, min, max): | |
time_to_sleep = randint(min, max) | |
try: | |
print('fake sleeping {} secs'.format(time_to_sleep)) | |
WebDriverWait(self.browser, time_to_sleep).until( | |
EC.presence_of_element_located( | |
(By.XPATH, "//input[@id='non_existent_xpath']")) | |
) | |
except Exception: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Great!