diff --git a/test/appium/tests/test_general_verifications.py b/test/appium/tests/test_general_verifications.py index f59e74bca9..4c46c57619 100644 --- a/test/appium/tests/test_general_verifications.py +++ b/test/appium/tests/test_general_verifications.py @@ -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)) diff --git a/test/appium/views/web_views/base_web_view.py b/test/appium/views/web_views/base_web_view.py index 00146e1d1c..5d09aa157c 100644 --- a/test/appium/views/web_views/base_web_view.py +++ b/test/appium/views/web_views/base_web_view.py @@ -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()