Update mailserver locator

Signed-off-by: Serhy <sergii@status.im>
This commit is contained in:
Serhy 2020-11-23 14:07:24 +02:00
parent ecc41bebe0
commit 166bdbf798
No known key found for this signature in database
GPG Key ID: 5D7C4B9E2B6F500B
3 changed files with 5 additions and 5 deletions

View File

@ -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'

View File

@ -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)

View File

@ -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):