|
@@ -95,7 +95,9 @@ class Screen:
|
|
|
query = f'//*[not(self::script) and not(self::style) and contains(text(), "{text}")]'
|
|
|
element = self.selenium.find_element(By.XPATH, query)
|
|
|
if not element.is_displayed():
|
|
|
- raise AssertionError(f'Found "{text}" but it is hidden')
|
|
|
+ self.wait(0.1) # HACK: repeat check after a short delay to avoid timing issue on fast machines
|
|
|
+ if not element.is_displayed():
|
|
|
+ raise AssertionError(f'Found "{text}" but it is hidden')
|
|
|
return element
|
|
|
except NoSuchElementException:
|
|
|
raise AssertionError(f'Could not find "{text}"')
|