appium / ruby_lib_core

Core library for the Ruby client
Apache License 2.0
32 stars 23 forks source link

android 15 test note #535

Closed KazuCocoa closed 3 months ago

KazuCocoa commented 3 months ago

with a real device

Maybe need to check

ERROR AppiumLibCoreTest::WebDriver::DeviceTest#test_location (205.82s)
Minitest::UnexpectedError:         Selenium::WebDriver::Error::UnknownError: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command '/Users/kazu/Library/Android/sdk/platform-tools/adb -P 5037 -s <device> shell am start-foreground-service -e longitude 100 -e latitude 100 -e altitude 75 io.appium.settings/.LocationService' exited with code 255'; Command output: Error: Not found; no service started.

            UnknownError: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command '/Users/kazu/Library/Android/sdk/platform-tools/adb -P 5037 -s <device> shell am start-foreground-service -e longitude 100 -e latitude 100 -e altitude 75 io.appium.settings/.LocationService' exited with code 255'; Command output: Error: Not found; no service started.

                at getResponseForW3CError (/Users/kazu/.nvm/versions/node/v16.15.1/lib/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/errors.js:1118:9)
                at asyncHandler (/Users/kazu/.nvm/versions/node/v16.15.1/lib/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/protocol.js:491:57)
            /Users/kazu/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/selenium-webdriver-4.18.1/lib/selenium/webdriver/remote/response.rb:55:in `assert_ok'
            /Users/kazu/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/selenium-webdriver-4.18.1/lib/selenium/webdriver/remote/response.rb:34:in `initialize'
            /Users/kazu/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/selenium-webdriver-4.18.1/lib/selenium/webdriver/remote/http/common.rb:83:in `new'
            /Users/kazu/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/selenium-webdriver-4.18.1/lib/selenium/webdriver/remote/http/common.rb:83:in `create_response'
            /Users/kazu/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/selenium-webdriver-4.18.1/lib/selenium/webdriver/remote/http/default.rb:103:in `request'
            lib/appium_lib_core/common/base/http_default.rb:66:in `request'
            /Users/kazu/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/selenium-webdriver-4.18.1/lib/selenium/webdriver/remote/http/common.rb:59:in `call'
            /Users/kazu/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/selenium-webdriver-4.18.1/lib/selenium/webdriver/remote/bridge.rb:607:in `execute'
            lib/appium_lib_core/common/base/bridge.rb:303:in `set_location'
            lib/appium_lib_core/common/base/has_location.rb:47:in `location='
            lib/appium_lib_core/common/base/has_location.rb:67:in `set_location'
            test/functional/android/webdriver/device_test.rb:63:in `test_location'

tested manually, then ok:

ERROR AppiumLibCoreTest::Android::DeviceTest#test_open_notifications (399.11s)
Minitest::UnexpectedError:         Appium::Core::Wait::TimeoutError: timed out after 20 seconds (An element could not be located on the page using the given search parameters.; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception)
            lib/appium_lib_core/common/wait.rb:114:in `until_true'
            lib/appium_lib_core/common/wait.rb:157:in `wait_until_true'
            test/functional/android/android/device_test.rb:243:in `test_open_notifications'
ERROR AppiumLibCoreTest::Android::DeviceTest#test_take_element_screenshot (508.79s)
Minitest::UnexpectedError:         Appium::Core::Wait::TimeoutError: timed out after 20 seconds (An element could not be located on the page using the given search parameters.; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception)
            lib/appium_lib_core/common/wait.rb:67:in `until'
            lib/appium_lib_core/common/wait.rb:193:in `wait_until'
            test/functional/android/android/device_data_test.rb:79:in `test_take_element_screenshot'
ERROR AppiumLibCoreTest::Android::DeviceTest#test_context_related (617.45s)
Minitest::UnexpectedError:         Appium::Core::Wait::TimeoutError: timed out after 20 seconds (An element could not be located on the page using the given search parameters.; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception)
            lib/appium_lib_core/common/wait.rb:67:in `until'
            lib/appium_lib_core/common/wait.rb:193:in `wait_until'
            test/functional/android/android/device_test.rb:98:in `test_context_related'
KazuCocoa commented 3 months ago

I found that rarely uia2 server running on a device behaved weirdly. It kept running? and previous session info was kept. Uninstalling it once fixed that but potentially it is weird.