Im trying to get the value of the timer in the following website: https://userinyerface.com/game.html The timer starts from zero, however the problem is that when I retrieve the timer with selenium using the following python code:
def setUp(self):
self.driver = webdriver.Chrome()
def test_path(self):
driver = self.driver
driver.get("https://userinyerface.com/game.html")
try:
timer_is_displayed = WebDriverWait(driver,
10).until(EC.visibility_of_element_located((By.XPATH, '//div//div[1]//div[2]//div[2] //div')))
timer = driver.find_element(By.XPATH, '//div//div[1]//div[2]//div[2]//div')
print(timer.text)
finally:
driver.quit()
it prints the timer as 00:00:02, if add time.sleep(1) it returns an error as the page did not have time to load before looking for the element. If I do time.sleep(2) it returns 00:00:02, how can I check that the timer starts from 00:00:00? is there a way to find the starting value of that particular element?
I've tried using explicit waits to no avail.