From 14be2c0d5eda16560ff9a72531fa2b7f4f8bbfe7 Mon Sep 17 00:00:00 2001 From: Serhy Date: Sun, 22 Jul 2018 16:38:01 +0300 Subject: [PATCH] [TESTS] Added browser refresh button test Signed-off-by: Serhy --- test/appium/tests/atomic/browsing/test_browsing.py | 14 ++++++++++++++ test/appium/views/web_views/base_web_view.py | 7 +++++++ 2 files changed, 21 insertions(+) diff --git a/test/appium/tests/atomic/browsing/test_browsing.py b/test/appium/tests/atomic/browsing/test_browsing.py index 2479496563..76b28ddab8 100644 --- a/test/appium/tests/atomic/browsing/test_browsing.py +++ b/test/appium/tests/atomic/browsing/test_browsing.py @@ -95,3 +95,17 @@ class TestBrowsing(SingleDeviceTestCase): browsing_view.browser_next_page_button.click() browsing_view.find_text_part('Избранная статья') browsing_view.back_to_home_button.click() + + @marks.testrail_id(3783) + @marks.smoke_1 + def test_refresh_button_browsing_app_webview(self): + sign_in_view = SignInView(self.driver) + sign_in_view.create_user() + status_test_dapp = sign_in_view.open_status_test_dapp() + status_test_dapp.wait_for_d_aap_to_load() + status_test_dapp.transactions_button.click() + status_test_dapp.find_full_text('Sign message') + status_test_dapp.browser_refresh_page_button.click() + status_test_dapp.find_full_text('defaultAccount') + + diff --git a/test/appium/views/web_views/base_web_view.py b/test/appium/views/web_views/base_web_view.py index 9436ecc645..6f876d253d 100644 --- a/test/appium/views/web_views/base_web_view.py +++ b/test/appium/views/web_views/base_web_view.py @@ -34,6 +34,12 @@ class BrowserNextPageButton(BaseButton): self.locator = self.Locator.accessibility_id('next-page-button') +class BrowserRefreshPageButton(BaseButton): + def __init__(self, driver): + super(BrowserRefreshPageButton, self).__init__(driver) + self.locator = self.Locator.xpath_selector('(//android.view.ViewGroup[@content-desc="icon"])[4]') + + class WebViewBrowserButton(BaseButton): def __init__(self, driver): super(WebViewBrowserButton, self).__init__(driver) @@ -73,6 +79,7 @@ class BaseWebView(BaseView): self.web_view_browser = WebViewBrowserButton(self.driver) self.always_button = AlwaysButton(self.driver) self.browser_cross_icon = BrowserCrossIcon(self.driver) + self.browser_refresh_page_button = BrowserRefreshPageButton(self.driver) def wait_for_d_aap_to_load(self, wait_time=35): counter = 0