Macaca Version:1.20
Macaca Doctor Logs:
$ macaca doctor
macaca-doctor version: 1.0.28
Node.js checklist:
node env: H:\nodejs\node.exe
node version: v6.10.0
Android checklist:
JAVA version is 1.8.0_101
JAVA_HOME is set to C:\Program Files\Java\jdk1.8.0_101
ANDROID_HOME is set to D:\sdk
Platforms is set to D:\sdk\platforms\android-24
Android tools is set to D:\sdk\tools\android.bat
ADB tool is set to D:\sdk\platform-tools\adb.exe
ANT_HOME is set to H:\apache-ant-1.9.6
Installed driver list:
android: 1.1.25
chrome: 1.0.5
Operate System:win7 64 位
Programming Language:node
微信搜索公众号时切换到 webviewContext 失败。
微信点搜索按钮,进入搜索界面,输入搜索关键字之后点击搜一搜,跳转 webview 搜索结果页面。
之后执行 contexts() 获取上下文报错。
使用的三星 s4,5.0 系统,chrome 版本 43
webdriver sdk launched
wx_get_links.test.js
androidOpts:{ platformName: 'Android',
platformVersion: '5.0',
autoAcceptAlerts: true,
reuse: 3,
udid: '4d00f618684d5051',
package: 'com.tencent.mm',
activity: '.ui.LauncherUI',
androidProcess: 'com.tencent.mm:tools',
app: undefined }
INSTRUMENTATION_STATUS: numtests=1
INSTRUMENTATION_STATUS: stream=
com.android.uiautomator.client.Initialize:
INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
INSTRUMENTATION_STATUS: test=testStartServer
INSTRUMENTATION_STATUS: class=com.android.uiautomator.client.Initialize
INSTRUMENTATION_STATUS: current=1
INSTRUMENTATION_STATUS_CODE: 1
uiautomator start socket server.
socket server ready
socket client ready
recive: {"cmd":"alert","args":{"action":"registerAutoAcceptAlerts"}}
return: {"success":true,"data":{"status":0,"value":true}}
recive: {"cmd":"wake","args":{}}
return: {"success":true,"data":{"status":0,"value":true}}
recive: {"cmd":"find","args":{"strategy":"name","selector":"套餐&流量","multiple":false}}
return: {"success":true,"data":{"status":0,"value":{"ELEMENT":"1"}}}
recive: {"cmd":"click","args":{"elementId":"1"}}
return: {"success":true,"data":{"status":0,"value":true}}
chromedriver bin path: D:\NodeProjects\AutoMobile\node_modules.1.0.30@macaca-chromedriver\exec\chromedriver.exe
Starting ChromeDriver 2.20.353145 (343b531d31eeb933ec778dbcf7081628a1396067) on port 9517
Only local connections are allowed.
chromedriver starting success.
chromedriver ready with: {"sessionId":null,"status":100,"value":{"message":"chrome not reachable\n (Driver info: chromedriver=2.20.353145 (343b531d31eeb933ec778dbcf7081628a1396067),platform=Windows NT 6.1 SP1 x86_64)"}}
1 passing (1m)
1 failing
1) wx_get_links.test.js 进入 webview:
Error: [contexts()] Error response status: 6, Selenium error: no such session
(Driver info: chromedriver=2.20.353145 (343b531d31eeb933ec778dbcf7081628a1396067),platform=Windows NT 6.1 SP1 x86_64)
at exports.newError (D:\NodeProjects\AutoMobile\node_modules.1.0.15@macaca-wd\wd\lib\utils.js:139:13)
at D:\NodeProjects\AutoMobile\node_modules.1.0.15@macaca-wd\wd\lib\callbacks.js:75:19
at D:\NodeProjects\AutoMobile\node_modules.1.0.15@macaca-wd\wd\lib\webdriver.js:179:5
at Request._callback (D:\NodeProjects\AutoMobile\node_modules.1.0.15@macaca-wd\wd\lib\http-utils.js:87:7)
at Request.self.callback (D:\NodeProjects\AutoMobile\node_modules.2.55.0@request\request.js:368:22)
at Request. (D:\NodeProjects\AutoMobile\node_modules.2.55.0@request\request.js:1219:14)
at IncomingMessage. (D:\NodeProjects\AutoMobile\node_modules.2.55.0@request\request.js:1167:12)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)