chore: try to use exists method for modal
This commit is contained in:
parent
3aef4930ff
commit
e8d225db8b
|
@ -313,8 +313,8 @@ class YourProfileView(OnboardingView):
|
|||
def next(self, attempts: int = 2) -> 'YourEmojihashAndIdenticonRingView':
|
||||
self._next_button.click()
|
||||
try:
|
||||
return YourEmojihashAndIdenticonRingView().wait_until_appears()
|
||||
except AssertionError as err:
|
||||
return YourEmojihashAndIdenticonRingView().wait_to_be_present()
|
||||
except Exception as err:
|
||||
if attempts:
|
||||
return self.next(attempts - 1)
|
||||
else:
|
||||
|
@ -387,7 +387,6 @@ class YourEmojihashAndIdenticonRingView(OnboardingView):
|
|||
)
|
||||
return self.profile_image.has_text(text, constants.tesseract.text_on_profile_image, crop=crop)
|
||||
|
||||
@allure.step
|
||||
@allure.step('Verify: User image background color')
|
||||
def is_user_image_background_white(self):
|
||||
crop = driver.UiTypes.ScreenRectangle(
|
||||
|
@ -395,6 +394,15 @@ class YourEmojihashAndIdenticonRingView(OnboardingView):
|
|||
)
|
||||
return self.profile_image.has_color(constants.Color.WHITE, crop=crop)
|
||||
|
||||
@allure.step
|
||||
def wait_to_be_present(self, timeout_msec: int = configs.timeouts.UI_LOAD_TIMEOUT_MSEC):
|
||||
try:
|
||||
driver.waitForObjectExists(self.real_name, timeout_msec)
|
||||
LOG.info('%s: is present', self)
|
||||
return self
|
||||
except Exception as ex:
|
||||
raise ex
|
||||
|
||||
|
||||
class CreatePasswordView(OnboardingView):
|
||||
|
||||
|
|
Loading…
Reference in New Issue