- Getting Started with Test Suite
- Studio
- Test Suite - Studio
- Overview
- Testing activities and APIs
- Orchestrator
- Testing robots
- Test Manager
Troubleshooting scenarios
If you run into problems, consider the following troubleshooting scenarios:
The topics below describe the problems, and their corresponding remedies, for Mobile Device Automation.
Description: The workflow in Studio throws unexpected errors, and the activity packages don't display the versions installed.
Cause: Inside your project, the major version of the UI.Automation activity package doesn't match the major version of the Mobile.Automation activity package. For example, the major version of the UI.Automation package installed is 22.10.x, and the major version of the Mobile.Automation package installed is 22.4.x.
Remedy: Make sure that the major versions of the UI.Automation and Mobile.Automation activity packages, installed in your project, match. For example, pair UI.Automation.Activities version 22.10.x only with Mobile.Automation.Activities version 22.10.x.
Condition: When using Appium 2.0.
/wd/hub/session
.
--base-path /wd/hub
.
Condition: When using Appium 2.0.
Description: All non-standard capabilities should have a vendor prefix.
appium:
prefix for all capabilities, as follows:
- In the command prompt or terminal, instead of
--default-capabilities "{\"systemPort\": 8201}"
, input--default-capabilities "{\"appium:systemPort\": 8201}"
. - In the Add a device tab from Mobile Device Manager, manually add the
appium:
prefix before the name of any additional desired capability.
Condition: When using Appium 2.0.
automationName
capability can't be blank.
appium:
as a prefix. For example, appium:automationName
.
Condition: When using Appium 2.0.
Description: Could not find the installed driver to support given caps.
Appium 2.0 doesn't automatically install the required drivers. You have to download them separately.
Remedy: Install the required driver for your platform.
- For Android devices, install the
uiautomator2
driver, using theappium driver install uiautomator2
command. - For iOS devices, install the
xcuitest
driver, using theappium driver install xcuitest
command.
The following topics describe the problems for Android devices, and their corresponding remedies.
InvalidArgumentException
coming from a discrepancy in the
expected format of a capability. The issue arises when a capability is entered as a
String, while Appium expects a Boolean value. An indicative error message
includes:Failed to create session.
A new session could not be created.
Details: io.appium.uiautomator2.common.exceptions.InvalidArgumentException:
Invalid '<capability name>' setting value type.
Got java.lang.String. Expected: java.lang.Boolean
Failed to create session.
A new session could not be created.
Details: io.appium.uiautomator2.common.exceptions.InvalidArgumentException:
Invalid '<capability name>' setting value type.
Got java.lang.String. Expected: java.lang.Boolean
Remedy: Uninstall the following apps from the local device:
io.appium.uiautomator2.server
io.appium.uiautomator2.server.test
WebDriverException
. This error typically
displays as Parameters were incorrect. We wanted {\"required\":[\"text\"]}
and you sent [\"value\"]", "FaultCode":"WebDriverException"}
.
Remedy: Uninstall your current version of UiAutomator 2. Then install a newer version, using the following commands in the given order:
appium driver uninstall uiautomator2
appium driver install uiautomator2@2.29.0
, where2.29.0
is the version that you want to install. You can replace this with any available version.
npm install -g appium
(for Appium
1.x), or npm install -g appium@next
(for Appium 2.0)
command fails, because you're running behind a proxy. The error throws the following
message:
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network npm ERR! network If you are behind a proxy, please make sure that the npm ERR! network 'proxy' config is set properly.
See: 'npm help config'
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network npm ERR! network If you are behind a proxy, please make sure that the npm ERR! network 'proxy' config is set properly.
See: 'npm help config'
Remedy: Configure npm (Node Package Manager) to use your proxy. Follow the steps below:
-
Fetch your proxy server address, and your port number:
- Go to Internet Options.
- Select the Connections tab.
-
Select LAN settings, and copy the content inside the Address, and Port fields.
-
Return to the Node.js command prompt, and run a command that follows the format below:
- For HTTP proxies:
npm config set http://your_proxy_address:your_port_number
. - For HTTPS proxies:
npm config set https://your_proxy_address:your_port_number
.
- For HTTP proxies:
- Run the
npm install -g appium
(for Appium 1.x), ornpm install -g appium@next
(for Appium 2.0) command again.
Description: Could not access the provided web context. Ensure that the Android WebView is debuggable. Visit Remote debugging WebViews for more information about accessing web contexts.
Remedies:
- Use the WebView as Native selectors on the web contexts that aren't recognized.
- If the selectors work on web applications, but not on a native application, then the application doesn’t enable debugging webviews. In this case, see Get started with remote debugging Android WebViews, and Remote debugging WebViews.
Description: Device not authorized.
Remedy: Take the following steps:
- Use the
adb devices
command to check the existent devices. - Revoke Debugging on phone.
- Restart the ADB server, by using the following commands, in this order:
adb kill-server
, and thenadb start-server
. - Reconnect the device, and confirm that you agree to the connection on that device.
Description: The Android device launches a browser automation instead of the given app, therefore causing errors.
Remedy: Start with a web browser instead.
The topics below describe the problems, and their corresponding remedies, for iOS devices.
Description: When you click a WebView element the selector doesn't work, and you can't automate the element.
Remedy: Use simulators with the latest version of iOS and Appium 2.
Description: iOS physical device fails to start.
Remedy: Take the following steps:
- Make sure that your device is trusting the certificate. On your device, go to Settings > General > Profiles & Device Management, tap on the email entry (e.g. Apple Development: username@email.com), and then trust the certificate. If the device is using your corporate account, this would not be needed.
- If you get an error that port 8100 is not accessible, close Appium (
ctrl + c
) and then restart it. - If you get a different error, consider looking through Appium XCUITest Driver Real Device.
Description: iOS 16.0 device fails to start or connect.
Remedy: Install and use Appium 2.0, instead of Appium 1. Check the Local iOS device prerequisites section for more information on installing and managing Appium 2.0.
Description: iOS 12.4.5 doesn't work as expected while paired with Appium 1.22.3.
Cause: This is caused by an issue with Appium.
Remedy: Choose one of the options below:
- Use a lower version of Appium, such as 1.17.0.
- Upgrade the device to versions equal to, or higher than iOS 14.
- Mobile device automation
- Workflow and activities generating errors
- No route found for wd/hub/ session
- Vendor prefix needed for all non-standard capabilities
- automationName can't be blank
- Can't find the installed driver
- Android
- Connection failure due to
InvalidArgumentException
for capabilities - Activity failure due to a
WebDriverException
- Appium installation fails due to proxy
- Could not access the provided web context
- Device not authorized
- Browser Automation while starting from the launch screen
- Android app doesn't launch
- iOS
- Cannot click WebView elements on iOS 13
- iOS physical device fails to start
- iOS 16.0 device fails to start
- iOS 12.4.5 malfunctions