chore: add attempts to click Delete button and removed awaiting
This commit is contained in:
parent
90174e64de
commit
58bba9e30f
|
@ -10,10 +10,17 @@ class DeletePopup(BasePopup):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self._delete_button = Button('delete_StatusButton')
|
self._delete_button = Button('delete_StatusButton')
|
||||||
|
|
||||||
@allure.step("Delete entity")
|
@allure.step("Delete channel")
|
||||||
def delete(self):
|
def delete(self, attempts: int = 2):
|
||||||
self._delete_button.click()
|
try:
|
||||||
self.wait_until_hidden()
|
self._delete_button.click()
|
||||||
|
except Exception as ex:
|
||||||
|
if attempts:
|
||||||
|
self.delete(attempts-1)
|
||||||
|
else:
|
||||||
|
raise ex
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class DeleteCategoryPopup(DeletePopup):
|
class DeleteCategoryPopup(DeletePopup):
|
||||||
|
|
Loading…
Reference in New Issue