chore: add attempts for clicking sign out button

This commit is contained in:
Anastasiya Semenkevich 2023-12-08 15:09:10 +03:00 committed by Anastasiya
parent 577bf54134
commit 90a6c09523
1 changed files with 9 additions and 2 deletions

View File

@ -11,5 +11,12 @@ class SignOutPopup(BasePopup):
self._sign_out_and_quit_button = Button('signOutConfirmationButton')
@allure.step('Click sign out and quit button')
def sign_out_and_quit(self):
self._sign_out_and_quit_button.click()
def sign_out_and_quit(self, attempts: int = 2):
try:
self._sign_out_and_quit_button.click()
except Exception as ec:
if attempts:
self.sign_out_and_quit(attempts-1)
else:
raise ec