status-desktop/test/e2e/gui/components/settings/sign_out_popup.py

24 lines
650 B
Python
Raw Permalink Normal View History

2023-12-01 04:32:44 +00:00
import allure
from gui.components.base_popup import BasePopup
from gui.elements.button import Button
from gui.objects_map import settings_names
2023-12-01 04:32:44 +00:00
class SignOutPopup(BasePopup):
def __init__(self):
super().__init__()
self._sign_out_and_quit_button = Button(settings_names.signOutConfirmationButton)
2023-12-01 04:32:44 +00:00
@allure.step('Click sign out and quit button')
def sign_out_and_quit(self, attempts: int = 2):
try:
2024-09-30 09:48:45 +00:00
self._sign_out_and_quit_button.click(timeout=10)
except Exception as ec:
if attempts:
self.sign_out_and_quit(attempts-1)
else:
raise ec