2023-12-01 04:32:44 +00:00
|
|
|
import allure
|
|
|
|
|
|
|
|
from gui.components.base_popup import BasePopup
|
|
|
|
from gui.elements.button import Button
|
2024-02-13 09:04:24 +00:00
|
|
|
from gui.objects_map import names
|
2023-12-01 04:32:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
class SignOutPopup(BasePopup):
|
|
|
|
|
|
|
|
def __init__(self):
|
|
|
|
super().__init__()
|
2024-02-13 09:04:24 +00:00
|
|
|
self._sign_out_and_quit_button = Button(names.signOutConfirmationButton)
|
2023-12-01 04:32:44 +00:00
|
|
|
|
|
|
|
@allure.step('Click sign out and quit button')
|
2023-12-08 12:09:10 +00:00
|
|
|
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
|
|
|
|
|