请指点一下 bootstrap 项目如何调试,打包后的 bootstrap 放到设置的什么位置?
期待开源和 windows 版本
看完晓光老师的这一份总结,心里也在默数自己种种做得不够的好的地方。2016 向心中的目标前行。
做得真全面
#6 楼 @gaoxing200851 使用该命令屏蔽 USB 充电 adb shell dumpsys battery set usb 0
awk: not found
#3 楼 @hudiefeifei 重装 ideviceinstaller 还是一样的效果,怀疑不是这个的问题。通过 Appium GUI 和终端启动 appium 都能正常识别 ideviceinstaller 并启动真机上的 app
全栈测试工程师,相信我们这行业有很多这样的人,或者正在向这方面发展。
我也在做相关的二次开发,但看了您的过后很多东西更明白了
我今天也遇到了这个问题,已解决。
Appium 模式:现公布解决方法,首先可能需要更新 chromedriver 到最新版本(或者使用 appium1.4.0 自带 2.15.322448),在模拟器或手机端安装 chrome,版本号大于 33 即可(我使用的是 43.0.2357.93),做好以上准备工作后在任务管理器中干掉 chromedriver 进程。
运行成功后的 Appium 关键日志如下:
> info: [debug] Available contexts: NATIVE_APP,WEBVIEW_com.**.**
> info: [debug] Connecting to chrome-backed webview
> info: Set chromedriver binary as: d:\Program Files\Appium\node_modules\appium\build\chromedriver\windows\chromedriver.exe
> info: Killing any old chromedrivers, running: FOR /F "usebackq tokens=5" %a in (`netstat -nao ^| findstr /R /C:"9515 "`) do (FOR /F "usebackq" %b in (`TASKLIST /FI "PID eq %a" ^| findstr /I chromedriver.exe`) do (IF NOT %b=="" TASKKILL /F /PID %a))
> info: Successfully cleaned up old chromedrivers
> info: Spawning chromedriver with: d:\Program Files\Appium\node_modules\appium\build\chromedriver\windows\chromedriver.exe --url-base=wd/hub --port=9515
> info: [CHROMEDRIVER STDOUT] Starting ChromeDriver 2.15.322448 (52179c1b310fec1797c81ea9a20326839860b7d3) on port 9515
> Only local connections are allowed.
> info: Proxying [GET /status] to [GET http://127.0.0.1:9515/wd/hub/status] with no body
> info: Got response with status 200: {"sessionId":"","status":0,"value":{"build":{"version":"alpha"},"os":{"arch":"x86_64","name":"Windows NT","version":"6.1 SP1"}}}
> info: Proxying [POST /session] to [POST http://127.0.0.1:9515/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.**.**","androidUseRunningApp":true,"androidDeviceSerial":"192.168.180.101:5555"}}}
> info: Got response with status 200: {"sessionId":"281726e22ffb4337f02a6649aff41056","status":0,"value":{"acceptSslCerts":true,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"browserName":"chrome","chrome":{},"cssSelect...
> info: [debug] Responding to client with success: {"status":0,"value":null,"sessionId":"0319316c-5f0e-4b90-952b-689313a56cbf"}
> info: <-- POST /wd/hub/session/0319316c-5f0e-4b90-952b-689313a56cbf/context 200 6008.816 ms - 76 {"status":0,"value":null,"sessionId":"0319316c-5f0e-4b90-952b-689313a56cbf"}
> info: --> POST /wd/hub/session/0319316c-5f0e-4b90-952b-689313a56cbf/element {"using":"id","value":"username"}
> info: Proxying [POST /wd/hub/session/0319316c-5f0e-4b90-952b-689313a56cbf/element] to [POST http://127.0.0.1:9515/wd/hub/session/281726e22ffb4337f02a6649aff41056/element] with body: {"using":"id","value":"username"}
> info: Got response with status 200:
@irisliu 我今天也遇到了这个问题,已解决。
Appium 模式:现公布解决方法,首先可能需要更新 chromedriver 到最新版本(或者使用 appium1.4.0 自带 2.15.322448),在模拟器或手机端安装 chrome,版本号大于 33 即可(我使用的是 43.0.2357.93),做好以上准备工作后在任务管理器中干掉 chromedriver 进程。
运行成功后的 Appium 关键日志如下:
> info: [debug] Available contexts: NATIVE_APP,WEBVIEW_com.**.**
> info: [debug] Connecting to chrome-backed webview
> info: Set chromedriver binary as: d:\Program Files\Appium\node_modules\appium\build\chromedriver\windows\chromedriver.exe
> info: Killing any old chromedrivers, running: FOR /F "usebackq tokens=5" %a in (`netstat -nao ^| findstr /R /C:"9515 "`) do (FOR /F "usebackq" %b in (`TASKLIST /FI "PID eq %a" ^| findstr /I chromedriver.exe`) do (IF NOT %b=="" TASKKILL /F /PID %a))
> info: Successfully cleaned up old chromedrivers
> info: Spawning chromedriver with: d:\Program Files\Appium\node_modules\appium\build\chromedriver\windows\chromedriver.exe --url-base=wd/hub --port=9515
> info: [CHROMEDRIVER STDOUT] Starting ChromeDriver 2.15.322448 (52179c1b310fec1797c81ea9a20326839860b7d3) on port 9515
> Only local connections are allowed.
> info: Proxying [GET /status] to [GET http://127.0.0.1:9515/wd/hub/status] with no body
> info: Got response with status 200: {"sessionId":"","status":0,"value":{"build":{"version":"alpha"},"os":{"arch":"x86_64","name":"Windows NT","version":"6.1 SP1"}}}
> info: Proxying [POST /session] to [POST http://127.0.0.1:9515/wd/hub/session] with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.**.**","androidUseRunningApp":true,"androidDeviceSerial":"192.168.180.101:5555"}}}
> info: Got response with status 200: {"sessionId":"281726e22ffb4337f02a6649aff41056","status":0,"value":{"acceptSslCerts":true,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"browserName":"chrome","chrome":{},"cssSelect...
> info: [debug] Responding to client with success: {"status":0,"value":null,"sessionId":"0319316c-5f0e-4b90-952b-689313a56cbf"}
> info: <-- POST /wd/hub/session/0319316c-5f0e-4b90-952b-689313a56cbf/context 200 6008.816 ms - 76 {"status":0,"value":null,"sessionId":"0319316c-5f0e-4b90-952b-689313a56cbf"}
> info: --> POST /wd/hub/session/0319316c-5f0e-4b90-952b-689313a56cbf/element {"using":"id","value":"username"}
> info: Proxying [POST /wd/hub/session/0319316c-5f0e-4b90-952b-689313a56cbf/element] to [POST http://127.0.0.1:9515/wd/hub/session/281726e22ffb4337f02a6649aff41056/element] with body: {"using":"id","value":"username"}
> info: Got response with status 200:
您好,我想请问一下做这个 uiautomatorviewer 二次开发的时候怎么进行调试呢,运行后,点击 Device Screenshot 提示不能与 adb 进行通讯,只能把打包好的 jar 放到 lib 下去运行。另外我给您发了一封邮件,还望不吝赐教。
实际执行的效果是:原文本框有 2015-03-19,调用 send 方法也是清空了文本框的值的,但最后结果就是输入了 2015-03-192015-03-20
@chenhengjie123 语言环境 java,client 版本 2.1.0。
@xi0w 那分享一份,学习一下
@jinjun0620 多谢,应该是这个问题吧。我通过变通的方式解决了这个问题。还是靠坐标来比 xpath 靠谱
String xpath = "//FrameLayout[1]/LinearLayout[1]/FrameLayout[1]/RelativeLayout[1]/View[1]/FrameLayout[1]/FrameLayout[1]/LinearLayout[1]/FrameLayout[2]/FrameLayout[1]/ScrollView[1]/LinearLayout[1]/LinearLayout[2]/LinearLayout[2]/ListView[2]/LinearLayout[1]/LinearLayout[2]/LinearLayout[1]/TextView[2]";
这写全了也还是一样报错
hybrid app 如何定位 webview 中的元素?去网页上获取?