Macaca macaca 的 app-inspector 和 appium 服务是冲突的吗

我喜欢的K17 · November 18, 2019 · Last by 我喜欢的K17 replied at November 19, 2019 · 2022 hits

如题,我用 appium 做 UI 自动化测试,但是用的是 macaca 的 app-inspector 来查看 UI 树状图,但是开启了 app-inspector 之后,运行 appium 脚本时一直报错:
selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: The instrumentation process cannot be initialized. Make sure the application under test does not crash and investigate the logcat output.

日志如下:
[debug] [W3C] Encountered internal error running command: Error: The instrumentation process cannot be initialized. Make sure the application under test does not crash and investigate the logcat output.
[debug] [W3C] at Object.wrappedLogger.errorAndThrow (/usr/local/homebrew/lib/node_modules/appium/node_modules/appium-support/lib/logging.js:78:13)
[debug] [W3C] at UiAutomator2Server.errorAndThrow as startSession
[debug] [W3C] at
[HTTP] <-- POST /wd/hub/session 500 11962 ms - 809
[HTTP]

共收到 3 条回复 时间 点赞

或者说除了 app-inspector 还有其他查看元素的,网页的这种

我也是用 macaca 來查看元素,
我在寫 Test Case 時,會先用 macaca 來抓取手機元素,
然後要關掉後,再開啟 appium,不然會起衝突的!

对呀,不关掉 macaca 的 app-inspector 会起冲突,不知道还有什么方法比较友好的可以获取 iOS 和 Android 的 UI 树状图

需要 Sign In 后方可回复, 如果你还没有账号请点击这里 Sign Up