Fix e2e by rerun in a case of TLS failure in emulator

Signed-off-by: Serhy <sergii@status.im>
This commit is contained in:
Serhy 2020-05-15 18:59:40 +03:00
parent 604362958b
commit 84c31fcee0
No known key found for this signature in database
GPG Key ID: 5D7C4B9E2B6F500B
3 changed files with 4 additions and 3 deletions

View File

@ -23,7 +23,6 @@ class NetworkApi(object):
self.api_key = environ.get('ETHERSCAN_API_KEY') self.api_key = environ.get('ETHERSCAN_API_KEY')
def log(self, text: str): def log(self, text: str):
tests.test_suite_data.current_test.testruns[-1].steps.append(text) tests.test_suite_data.current_test.testruns[-1].steps.append(text)
logging.info(text) logging.info(text)
@ -51,6 +50,7 @@ class NetworkApi(object):
try: try:
return int(requests.request('GET', method, headers=self.headers).json()["result"]) return int(requests.request('GET', method, headers=self.headers).json()["result"])
except ValueError: except ValueError:
time.sleep(5)
pass pass
def get_latest_block_number(self) -> int: def get_latest_block_number(self) -> int:

View File

@ -21,7 +21,8 @@ RERUN_ERRORS = [
"[Errno 110] Connection timed out", "[Errno 110] Connection timed out",
"replacement transaction underpriced", "replacement transaction underpriced",
"StaleElementReferenceException", "StaleElementReferenceException",
"No System TLS" "'GetStartedButton' is not found on the screen",
"'AccessKeyButton' is not found on the screen"
] ]

View File

@ -61,7 +61,7 @@ class WebViewMenuButton(BaseButton):
self.locator = self.Locator.accessibility_id('chat-menu-button') self.locator = self.Locator.accessibility_id('chat-menu-button')
class URLEditBoxLockIcon(BaseEditBox): class URLEditBoxLockIcon(BaseButton):
def __init__(self, driver): def __init__(self, driver):
super(URLEditBoxLockIcon, self).__init__(driver) super(URLEditBoxLockIcon, self).__init__(driver)