fix privacy summary elm locator; changed python string formatting

Signed-off-by: Oleksii Lymarenko <alexey.lymarenko@gmail.com>
This commit is contained in:
Oleksii Lymarenko 2018-10-08 16:10:00 +03:00
parent 0b22bddca2
commit 2cab2bdc05
No known key found for this signature in database
GPG Key ID: 2007E841ECE4A02C
2 changed files with 4 additions and 2 deletions

View File

@ -16,6 +16,7 @@ class TestLinksVerifications(SingleDeviceTestCase):
self.driver.fail('{} Sign in view!'.format(no_link_found_error_msg))
base_web_view = signin_view.privacy_policy_link.click()
base_web_view.open_in_webview()
if not base_web_view.policy_summary.is_element_displayed():
self.errors.append('{} Sign in view!'.format(no_link_open_error_msg))

View File

@ -73,7 +73,7 @@ class PolicySummary(BaseElement):
def __init__(self, driver):
super(PolicySummary, self).__init__(driver)
self.locator = self.Locator.accessibility_id('Policy summary')
self.locator = self.Locator.xpath_selector('//*[@content-desc="Policy summary"] | //*[@text="Policy summary"]')
class BaseWebView(BaseView):
@ -105,4 +105,5 @@ class BaseWebView(BaseView):
def open_in_webview(self):
self.web_view_browser.click()
self.always_button.click()
if self.always_button.is_element_displayed():
self.always_button.click()