[UiAutomator2] Problem. Can't run tests
See original GitHub issueThe 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();
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:21 (3 by maintainers)
Top Results From Across the Web
Not able to run tests in android emulator. ([uiautomator2 ...
Hello I have created an emulator and launched it with AVD manager step in bitrise. When i try to run the appium scripts,...
Read more >Appium-UIAutomator2-Java: the same code works directly ...
When I'm using the same code in a PO model function, one element cannot be located and the test fails. I have no...
Read more >Can't run tests unless I restart io.appium.settings - Issues/Bugs
So I have this problem where I can not start my app, unless I kill io.appium.settings in adb. How it woks is: The...
Read more >error:'*****' cannot be proxied to UiAutomator2 server because ...
This error may appear when acquiring a capture or running a test. First, try the following: Run the test again Relaunch device Delete......
Read more >Write automated tests with UI Automator - Android Developers
The UI Automator testing framework provides a UiDevice class to access and perform operations on the device on which the target app is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You could update your installation guide 😉
Had the same exact issue on Ubuntu 18.04. Installing appium
--unsafe-perms
definitely did the trick