diff --git a/.github/workflows/functional-test.yml b/.github/workflows/functional-test.yml index c3b0bddc..9f9be775 100644 --- a/.github/workflows/functional-test.yml +++ b/.github/workflows/functional-test.yml @@ -168,14 +168,20 @@ jobs: - target: test/functional/android/webdriver/create_session_test.rb,test/functional/android/webdriver/device_test.rb,test/functional/android/webdriver/w3c_actions_test.rb automation_name: espresso name: test4 + - target: test/functional/android/android/mobile_commands_test.rb + automation_name: uiautomator2 + name: test5 + - target: test/functional/android/android/mobile_commands_test.rb + automation_name: espresso + name: test6 # Some may not work well on GHA. Haven't fully fixed. # test/functional/android/android/mjpeg_server_test.rb # test/functional/android/android/image_comparison_test.rb - # - target: test/functional/android/android/device_data_test.rb,test/functional/android/android/mobile_commands_test.rb + # - target: test/functional/android/android/device_data_test.rb # automation_name: uiautomator2 # name: test5 - # - target: test/functional/android/android/device_data_test.rb,test/functional/android/android/mobile_commands_test.rb + # - target: test/functional/android/android/device_data_test.rb # automation_name: espresso # name: test6 diff --git a/test/functional/android/android/device_test.rb b/test/functional/android/android/device_test.rb index 32f12380..b8373302 100644 --- a/test/functional/android/android/device_test.rb +++ b/test/functional/android/android/device_test.rb @@ -103,6 +103,8 @@ def test_context_related native_page = @driver.page_source webview_context = @@core.wait do + @driver.execute_script 'mobile: getContexts', { waitForWebviewMs: 5000 } + context = @driver.available_contexts.detect { |c| c.start_with?('WEBVIEW') } assert context context diff --git a/test/functional/android/android/mobile_commands_test.rb b/test/functional/android/android/mobile_commands_test.rb index 9e8f6396..24239c01 100644 --- a/test/functional/android/android/mobile_commands_test.rb +++ b/test/functional/android/android/mobile_commands_test.rb @@ -252,7 +252,7 @@ def test_device_info skip_as_appium_version '1.10.0' @driver = @core.start_driver - assert @driver.execute_script('mobile: deviceInfo', {}).size.positive? + assert @driver.execute_script('mobile:deviceInfo', {}).size.positive? end private