From 4189c41a968521eec50099492094865601bfb31b Mon Sep 17 00:00:00 2001 From: Valentina Novgorodtceva Date: Tue, 18 Jun 2024 16:40:12 +0700 Subject: [PATCH] test --- .../wallet/wallet_account_popups.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/test/e2e/gui/components/wallet/wallet_account_popups.py b/test/e2e/gui/components/wallet/wallet_account_popups.py index 2d761bb4d0..468ab8c475 100644 --- a/test/e2e/gui/components/wallet/wallet_account_popups.py +++ b/test/e2e/gui/components/wallet/wallet_account_popups.py @@ -108,8 +108,8 @@ class AccountPopup(BasePopup): @allure.step('Set eth address for account added from plus button') def set_origin_watched_address(self, value: str): - self._origin_combobox.click() - self._watched_address_origin_item.wait_until_appears().click() + self.click_origin_combobox() + self._watched_address_origin_item.click() assert getattr(self._origin_combobox.object, 'title') == WalletOrigin.WATCHED_ADDRESS_ORIGIN.value self._address_text_edit.text = value return self @@ -131,6 +131,17 @@ class AccountPopup(BasePopup): else: raise err + @allure.step('Click origin combobox') + def click_origin_combobox(self, attempts: int = 2): + self._origin_combobox.click() + try: + self._new_master_key_origin_item.wait_until_appears() + except AssertionError as err: + if attempts: + return self.click_origin_combobox(attempts - 1) + else: + raise err + @allure.step('Set new seed phrase for account') def set_origin_new_seed_phrase(self, value: str): self.open_add_new_account_popup().generate_new_master_key(value) @@ -138,7 +149,7 @@ class AccountPopup(BasePopup): @allure.step('Open add new account popup') def open_add_new_account_popup(self): - self._origin_combobox.click() + self.click_origin_combobox() return self.click_new_master_key() @allure.step('Set derivation path for account') @@ -161,7 +172,7 @@ class AccountPopup(BasePopup): @allure.step('Click continue in keycard settings') def continue_in_keycard_settings(self): - self._origin_combobox.click() + self.click_origin_combobox() self.click_new_master_key() self._use_keycard_button.click() return self