From 166bdbf798daecfddf67a79b4220bbb698655d1c Mon Sep 17 00:00:00 2001 From: Serhy Date: Mon, 23 Nov 2020 14:07:24 +0200 Subject: [PATCH] Update mailserver locator Signed-off-by: Serhy --- test/appium/tests/atomic/dapps_and_browsing/test_dapps.py | 1 + test/appium/views/base_element.py | 4 ++-- test/appium/views/profile_view.py | 5 ++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/appium/tests/atomic/dapps_and_browsing/test_dapps.py b/test/appium/tests/atomic/dapps_and_browsing/test_dapps.py index 4564fbd3c5..221aae04d1 100644 --- a/test/appium/tests/atomic/dapps_and_browsing/test_dapps.py +++ b/test/appium/tests/atomic/dapps_and_browsing/test_dapps.py @@ -38,6 +38,7 @@ class TestDApps(SingleDeviceTestCase): @marks.testrail_id(6323) @marks.medium + @marks.flaky def test_resolve_ipns_name(self): user = basic_user ipns_url = 'uniswap.eth' diff --git a/test/appium/views/base_element.py b/test/appium/views/base_element.py index 3c4e623602..968918735e 100644 --- a/test/appium/views/base_element.py +++ b/test/appium/views/base_element.py @@ -48,9 +48,9 @@ class BaseElement(object): return cls(MobileBy.XPATH, xpath_expression) @classmethod - def translation_id_selector(cls, id): + def translation_id_selector(cls, id, suffix=''): text = transl[id] - return BaseElement.Locator.xpath_selector('//*[@text="' + text + '"]') + return BaseElement.Locator.xpath_selector('//*[@text="' + text + '"]' + suffix) def __str__(self, *args, **kwargs): return "%s:%s" % (self.by, self.value) diff --git a/test/appium/views/profile_view.py b/test/appium/views/profile_view.py index ed10aaa5ae..0f29966720 100644 --- a/test/appium/views/profile_view.py +++ b/test/appium/views/profile_view.py @@ -404,8 +404,8 @@ class MailServerAddressInput(BaseEditBox): def __init__(self, driver): super(MailServerAddressInput, self).__init__(driver) - self.locator = self.Locator.xpath_selector( - "//*[@text='Mailserver address']/following-sibling::*[1]/android.widget.EditText") + self.locator = self.Locator.translation_id_selector('mailserver-address', + suffix='/following-sibling::*[1]/android.widget.EditText') class MailServerAutoSelectionButton(BaseButton): @@ -414,7 +414,6 @@ class MailServerAutoSelectionButton(BaseButton): self.locator = self.Locator.xpath_selector("//*[@text='Automatic selection']/following-sibling::*[1]") - class MailServerElement(BaseButton): def __init__(self, driver, server_name):