Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot run uiautomator dump command after updating to appium 1.9.1 #641

Closed
dtsvirkun opened this issue Dec 14, 2020 · 2 comments
Closed

Comments

@dtsvirkun
Copy link

Some windows are not accessible via esspresso driver ( eg. Selecting picture fromgallery), so we use uiatomator from devices to get window dump and then click by coordinates:

Map<String, Object> args = new HashMap<>();
 args.put("command", "uiautomator");
 args.put("args", Lists.newArrayList("dump"));
String output = driver.executeScript("mobile: shell", args);

For some reason it stopped working after updating to new appium 1.9.1, herelog out put:

[HTTP] --> POST /wd/hub/session/b2654494-a7c3-4344-be7b-eab675ff9242/execute/sync
[HTTP] {"script":"mobile:shell","args":[{"args":["dump"],"command":"uiautomator"}]}
[debug] [W3C (b2654494)] Calling AppiumDriver.execute() with args: ["mobile:shell",[{"args":["dump"],"command":"uiautomator"}],"b2654494-a7c3-4344-be7b-eab675ff9242"]
[AndroidDriver] Executing native command 'mobile:shell'
[debug] [AndroidDriver] Running '/Users/dmytrotsvirkun/Library/Android/sdk/platform-tools/adb -P 5037 -s ce091719c8ad611a03 shell uiautomator dump'
[AndroidDriver] Cannot execute the 'uiautomator' shell command. Original error: Command '/Users/dmytrotsvirkun/Library/Android/sdk/platform-tools/adb -P 5037 -s ce091719c8ad611a03 shell uiautomator dump' exited with code 137. StdOut: . StdErr: 
[debug] [W3C (b2654494)] Encountered internal error running command: Error: Cannot execute the 'uiautomator' shell command. Original error: Command '/Users/dmytrotsvirkun/Library/Android/sdk/platform-tools/adb -P 5037 -s ce091719c8ad611a03 shell uiautomator dump' exited with code 137. StdOut: . StdErr: 
[debug] [W3C (b2654494)]     at Object.errorAndThrow (/usr/local/lib/node_modules/appium/node_modules/appium-support/lib/logging.js:94:35)
[debug] [W3C (b2654494)]     at EspressoDriver.mobileShell (/usr/local/lib/node_modules/appium/node_modules/appium-android-driver/lib/commands/shell.js:41:9)
[HTTP] <-- POST /wd/hub/session/b2654494-a7c3-4344-be7b-eab675ff9242/execute/sync 500 641 ms - 953
[HTTP] 

In addition I can run this command manually and it works, but when test is in progress (appium is run for app), manual command execution also does not work.

@KazuCocoa
Copy link
Member

How about mobile: uiautomatorPageSource which is available in current appium@beta?
#628

@dtsvirkun
Copy link
Author

@KazuCocoa it works, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants