Appium [求助] Appium Inspector 里看不到 checkbox,但是网页源码里可以看到

sajking · 2018年05月30日 · 最后由 雨夜狂奔 回复于 2018年05月30日 · 1313 次阅读

最近在和某银行对接,然后在 android 的 webview 里用 Appium Inspector 去查看元素,发现最下面 “我同意” 前面的那个 checkbox 元素没有拿到:


但是在浏览器里访问这个网页看源码的话,是有定义一个 checkbox 的:

想请问为什么会有这种情况?然后应该如何才能正确定义到这个 checkbox 呢。。?现在没法往下继续了,谢谢各位大神!

共收到 2 条回复 时间 点赞

用 chrome 打开 chrome://inspect

不好意思,搞明白了,要切换到 webview 才可以。但是切 webview 的时候又提示
[Chromedriver] Error: Failed to start Chromedriver session: An error occurred (Original error: chrome not reachable

已经根据错误替换了 appium 的 chromedriver,还是提示这个错误。。有大神帮忙看看吗?

[Chromedriver] Error: Failed to start Chromedriver session: An error occurred (Original error: chrome not reachable
Chromedriver)
[Chromedriver] at Object.wrappedLogger.errorAndThrow (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-support/lib/logging.js:78:13)
[Chromedriver] at Chromedriver.callee$2$0$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-chromedriver/lib/chromedriver.js:357:13)
[Chromedriver] at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-chromedriver/node_modules/babel-runtime/regenerator/runtime.js:67:40)
[Chromedriver] at GeneratorFunctionPrototype.invoke as _invoke
[Chromedriver] at GeneratorFunctionPrototype.prototype.(anonymous function) as throw
[Chromedriver] at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-chromedriver/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[Chromedriver] at
[JSONWP Proxy] Proxying [POST /session] to [POST http://127.0.0.1:8000/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.ririjin.licai","androidUseRunningApp":true,"androidDeviceSerial":"M95CACPA6EF5V"}}}
[HTTP] <-- POST /wd/hub/session/affb097e-54ec-47e3-abac-28fb06464b0f/context - - ms - -
[HTTP]
[JSONWP Proxy] Got response with status 200: {"sessionId":"fbca1b6184452811109526d8fb3a8e01","status":100,"value":{"message":"chrome not reachable\n (Driver info: chromedriver=2.23.409710 (0c4084804897ac45b5ff65a690ec6583b97225c0),platform=Mac OS X 10.13.4 x86_64)"}}

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册