appium: [UiAutomator2] Problem. Can't run tests
The problem
For the past few days i tried to run tests with appium, plot twist, it didn’t work. On my previous project UiAutomator(1) did run well. I tried everything, please help :<
Environment
- Appium v1.11.1
- Ubuntu 18.04
- Node.js v8.15.1
- Npm
- Nexus_6_API_28
- Emulator
- Appium CLI Edit. Same on Appium Desktop
Details
I can’t run UiAutomator 2. Tried running: appium, sudo appium and sudo -E appium.
Link to Appium logs
https://gist.github.com/S-Borkowski/05c40fa94c40a2ea0f706ca184386c21
Code To Reproduce Issue
public void setUpBrowser() {
dc = new DesiredCapabilities();
dc.setCapability("deviceName",
"Android_SDK_built_for_x86");
//dc.setCapability("app",
// "/resources/base.apk");
dc.setCapability("platformName",
"Android");
dc.setCapability("automationName",
"UiAutomator2");
dc.setCapability("appPackage",
"com.company.project");
}
public void setUpMethod() {
dc.setCapability("appActivity",
"com.company.project." + activity);
try {
driver = new AndroidDriver(new URL("http://0.0.0.0:4723/wd/hub"), dc);
} catch (MalformedURLException e) {
e.printStackTrace();
}
softAssert = new SoftAssert();
}
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 21 (3 by maintainers)
You could update your installation guide 😉