2024-02-14 13:20:00 +03:00

32 lines
715 B
Python

import allure
from gui.components.base_popup import BasePopup
from gui.elements.button import Button
from gui.objects_map import names
class DeletePopup(BasePopup):
def __init__(self):
super().__init__()
self._delete_button = Button(names.delete_StatusButton)
@allure.step("Delete channel")
def delete(self, attempts: int = 2):
try:
self._delete_button.click()
except Exception as ex:
if attempts:
self.delete(attempts-1)
else:
raise ex
class DeleteCategoryPopup(DeletePopup):
def __init__(self):
super().__init__()
self._delete_button = Button(names.confirm_StatusButton)