macacajs / NoSmoke

A cross platform UI crawler which scans view trees then generate and execute UI test cases.
https://macacajs.github.io/NoSmoke
MIT License
199 stars 58 forks source link

Android模拟器浏览器chrome 访问H5问题 #40

Closed Archer456 closed 6 years ago

Archer456 commented 6 years ago

image

H5Test.yml

1. Initialization option

desiredCapabilities:

Electron Configuration

platformName: 'Android' browserName: 'Chrome' url: 'https://www.baidu.com'

2. Crawling option

crawlingConfig: platform: 'android' targetElements: SearchConetent: actionType: 2 searchValue : 'kw' actionValue : '中文+Test+Nosmoke' Search: actionType: 1 searchValue : 'su' clickTypes:

就是执行到打开了模拟器的浏览器 server端日志 也看到发送了

responseHandler.js:49:14 [master] pid:23330 Send HTTP Respone to Client[2018-01-05 14:42:41]: {"sessionId":"05a57509-a047-47b1-9b18-7033c33ca6e3","status":0,"value":"{\"platformName\":\"Android\",\"browserName\":\"Chrome\",\"url\":\"http://m.aicai.com/m/register.do?agentId=1&vt=5\"}"}

但是 并没有打开该网址 然后nosmoke端日志 就是一直刷新reporter generated: /home/cmd/scripts/NoSmoke/web/reports/2018-0-5-14:42:30-report.html

附上日志: macaca server Log cmd@TR:~$ macaca server --verbose

index.js:18:12 [master] pid:23330 webdriver server start with config: { port: 3456, verbose: true, always: true, ip: '192.168.66.113', host: 'TR', loaded_time: '2018-01-05 14:42:23' } middlewares.js:17:10 [master] pid:23330 base middlewares attached router.js:133:10 [master] pid:23330 router set webdriver sdk launched responseHandler.js:11:12 [master] pid:23330 Recieve HTTP Request from Client[2018-01-05 14:42:31]: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"platformName":"Android","browserName":"Chrome","url":"http://m.aicai.com/m/register.do?agentId=1&vt=5"}} session.js:47:10 [master] pid:23330 Creating session, sessionId: 05a57509-a047-47b1-9b18-7033c33ca6e3. checking permissionPatterns: [] uiautomator-client.js:62:14 [master] pid:23330 INSTRUMENTATION_STATUS: numtests=1 INSTRUMENTATION_STATUS: stream= com.macaca.android.testing.UIAutomatorWD: INSTRUMENTATION_STATUS: id=AndroidJUnitRunner INSTRUMENTATION_STATUS: test=MacacaTestRunner INSTRUMENTATION_STATUS: class=com.macaca.android.testing.UIAutomatorWD INSTRUMENTATION_STATUS: current=1 INSTRUMENTATION_STATUS_CODE: 1

uiautomator-client.js:62:14 [master] pid:23330 INSTRUMENTATION_STATUS: stream= UIAutomatorWD->http://localhost:9007<-UIAutomatorWD INSTRUMENTATION_STATUS_CODE: 0

UIAutomatorWD http server ready macaca-android.js:303:10 [master] pid:23330 start app with: {"package":"com.android.browser","activity":".BrowserActivity"} this.webviewVersion found 44 use it! starting chromedriver service! chromedriver bin path: /opt/nodejs/lib/node_modules/macaca-android/node_modules/macaca-chromedriver/exec/chromedriver2.20 Starting ChromeDriver 2.20.353124 (035346203162d32c80f1dce587c8154a1efa0c3b) on port 9515 Only local connections are allowed.

chromedriver starting success. proxy.js:51:14 [master] pid:23330 Proxy: /status:GET to http://localhost:9515/wd/hub/status:GET with body: proxy.js:59:16 [master] pid:23330 Got response with status 200: "{\"sessionId\":\"\",\"status\":0,\"value\":{\"build\":{\"version\":\"alpha\"},\"os\":{\"arch\":\"x86_64\",\"name\":\"Linux\",\"version\":\"4.4.0-104-generic\"}}}" proxy.js:51:14 [master] pid:23330 Proxy: /session:POST to http://localhost:9515/wd/hub/session:POST with body: {"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.android.browser","androidUseRunningApp":true,"androidDeviceSerial":"192.168.58.101:5555"}}} proxy.js:59:16 [master] pid:23330 Got response with status 200: {"sessionId":"80e9682ea5db3533c9126b348888c826","status":0,"value":{"acceptSslCerts":true,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"browserName":"chrome","chrome":{},"cssSel... chromedriver ready with: {"sessionId":null,"status":0,"value":{"acceptSslCerts":true,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"browserName":"chrome","chrome":{},"cssSelectorsEnabled":true,"databaseEnabled":false,"handlesAlerts":true,"hasTouchScreen":true,"javascriptEnabled":true,"locationContextEnabled":true,"mobileEmulationEnabled":false,"nativeEvents":true,"platform":"ANDROID","rotatable":false,"takesHeapSnapshot":true,"takesScreenshot":true,"version":"44.0.2403.119","webStorageEnabled":true}} proxy.js:51:14 [master] pid:23330 Proxy: /wd/hub/session/:sessionId/window_handles:GET to http://localhost:9515/wd/hub/session/80e9682ea5db3533c9126b348888c826/window_handles:GET with body: {} proxy.js:59:16 [master] pid:23330 Got response with status 200: {"sessionId":"80e9682ea5db3533c9126b348888c826","status":0,"value":["CDwindow-9564C0B4-4334-4A06-9D63-317CBDFD5D71"]} responseHandler.js:49:14 [master] pid:23330 Send HTTP Respone to Client[2018-01-05 14:42:41]: {"sessionId":"05a57509-a047-47b1-9b18-7033c33ca6e3","status":0,"value":"{\"platformName\":\"Android\",\"browserName\":\"Chrome\",\"url\":\"http://m.aicai.com/m/register.do?agentId=1&vt=5\"}"} responseHandler.js:11:12 [master] pid:23330 Recieve HTTP Request from Client[2018-01-05 14:42:47]: method: GET url: /wd/hub/session/05a57509-a047-47b1-9b18-7033c33ca6e3/source, jsonBody: {} proxy.js:51:14 [master] pid:23330 Proxy: /wd/hub/session/:sessionId/source:GET to http://localhost:9515/wd/hub/session/80e9682ea5db3533c9126b348888c826/source:GET with body: null proxy.js:59:16 [master] pid:23330 Got response with status 200: "{\"sessionId\":\"80e9682ea5db3533c9126b348888c826\",\"status\":0,\"value\":\"\u003Chtml xmlns=\\"http://www.w3.org/1999/xhtml\\\">\\u003Chead>\\u003C/head>\\u003Cbody>\\u003C/body>\\u003C/html>\"}" responseHandler.js:49:14 [master] pid:23330 Send HTTP Respone to Client[2018-01-05 14:42:47]: {"sessionId":"05a57509-a047-47b1-9b18-7033c33ca6e3","status":0,"value":"\"<html xmlns=\\"http://www.w3.org/1999/xhtml\\">\""}

nosmoke Log cmd@TR:~/scripts/NoSmoke/web$ nosmoke -c H5Test.yml --verbose

server.js:15:12 [master] pid:23347 server start with config: { port: 5678, verbose: true, config: 'H5Test.yml', ip: '192.168.66.113', host: 'TR', loaded_time: '2018-01-05 14:42:31' } udid: undefined (node:23347) DeprecationWarning: 'root' is deprecated, use 'global' <-- GET / reporter generated: /home/cmd/scripts/NoSmoke/web/reports/2018-0-5-14:42:30-report.html --> GET / 200 reporter generated: /home/cmd/scripts/NoSmoke/web/reports/2018-0-5-14:42:30-report.html initialize crawler (node:23347) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: this.terminate is not a function reporter generated: /home/cmd/scripts/NoSmoke/web/reports/2018-0-5-14:42:30-report.html reporter generated: /home/cmd/scripts/NoSmoke/web/reports/2018-0-5-14:42:30-report.html reporter generated: /home/cmd/scripts/NoSmoke/web/reports/2018-0-5-14:42:30-report.html ^C

SamuelZhaoY commented 6 years ago
  1. 建议用 electron 配置如下 platformName: 'Desktop' browserName: 'Electron' url: 'https://www.baidu.com'

  2. 这个页面input 很多, 占用了爬行对象的队列中的很多比重,建议做一下筛选. 我这边看了一下几乎所有随机的有效操作都在对一些隐藏的 input 发指令了. 可以研究一下怎么过滤有效元素

Archer456 commented 6 years ago

用electron 的效果是。


1. Initialization option

desiredCapabilities:

Web Configuration

platformName: 'Desktop' browserName: 'Electron' url: 'http://m.aicai.com/m/register.do?agentId=1&vt=5'

2. Crawling option

Web Configuration

crawlingConfig: platform: 'pc-web' targetElements: CommonRegist: actionType: 1 searchValue : '常规注册' loginAccount: searchValue : 'jq_account' actionValue : 'postsay123' loginPassword: searchValue : 'jq_comm_pass' actionValue : '123opqrst23' CellPhoneNumber: searchValue : 'jq_mobile' actionValue : '13751077575' loginButton: searchValue : 'common_registe' alertConfirm: searchValue : '该手机号已在本站注册过了,请更换手机号再试,多谢合作!' clickTypes:

可以访问到'http://m.aicai.com/m/register.do?agentId=1&vt=5该页, 但配置的 targetElements: CommonRegist: actionType: 1 searchValue : '常规注册'

未优先执行,点击 常规注册 直接 找到左上角的< 返回 先执行返回首页了。。。。 到了首页呢 看执行效果 也没看出什么规律 报了许多404 和找到一些元素 发送m.aicai.com/null 的请求

附上日志 NoSmoke Log cmd@TR:~/scripts/NoSmoke/web$ nosmoke -c H5Test.yml --verbose

server.js:15:12 [master] pid:13780 server start with config: { port: 5678, verbose: true, config: 'H5Test.yml', ip: '192.168.66.113', host: 'TR', loaded_time: '2018-01-08 08:54:46' } udid: undefined (node:13780) DeprecationWarning: 'root' is deprecated, use 'global' <-- GET / reporter generated: /home/cmd/scripts/NoSmoke/web/reports/2018-1-8-8-54-45-report.html --> GET / 200 initialize crawler reporter generated: /home/cmd/scripts/NoSmoke/web/reports/2018-1-8-8-54-45-report.html { raw: 'a class="ui_min" href="javascript:void(0);" title="最小化" style="display: inline-block;"', data: 'a class="ui_min" href="javascript:void(0);" title="最小化" style="display: inline-block;"', type: 'a', name: 'a', attribs: { class: 'ui_min', href: 'javascript:void(0);', title: '最小化', style: 'display: inline-block;' } } { raw: 'a class="ui_max" href="javascript:void(0);" title="最大化" style="display: inline-block;"', data: 'a class="ui_max" href="javascript:void(0);" title="最大化" style="display: inline-block;"', type: 'a', name: 'a', attribs: { class: 'ui_max', href: 'javascript:void(0);', title: '最大化', style: 'display: inline-block;' } } { raw: 'a class="ui_res" href="javascript:void(0);" title="还原"', data: 'a class="ui_res" href="javascript:void(0);" title="还原"', type: 'a', name: 'a', attribs: { class: 'ui_res', href: 'javascript:void(0);', title: '还原' } } { raw: 'a class="ui_close" href="javascript:void(0);" title="关闭(esc键)" style="display: inline-block;"', data: 'a class="ui_close" href="javascript:void(0);" title="关闭(esc键)" style="display: inline-block;"', type: 'a', name: 'a', attribs: { class: 'ui_close', href: 'javascript:void(0);', title: '关闭(esc键)', style: 'display: inline-block;' } } { raw: 'a href="javascript:window.history.back();" class="back"', data: 'a href="javascript:window.history.back();" class="back"', type: 'a', name: 'a', attribs: { href: 'javascript:window.history.back();', class: 'back' } } { raw: 'a href="javascript:void(0);" class="lottery_icon"', data: 'a href="javascript:void(0);" class="lottery_icon"', type: 'a', name: 'a', attribs: { href: 'javascript:void(0);', class: 'lottery_icon' } } { raw: 'a href="/index.do;jsessionid=EB407A917663DC636ECD110EEA80F654.c54?agentId=1&vt=5"', data: 'a href="/index.do;jsessionid=EB407A917663DC636ECD110EEA80F654.c54?agentId=1&vt=5"', type: 'a', name: 'a', attribs: { href: '/index.do;jsessionid=EB407A917663DC636ECD110EEA80F654.c54?agentId=1&vt=5' } } http:/m.aicai.com/index.do;jsessionid=EB407A917663DC636ECD110EEA80F654.c54?agentId=1&vt=5 <-- GET /2018-1-8-8-54-45/619c3fa1-388e-4598-b8c4-937f71f07fc5.png --> GET /2018-1-8-8-54-45/619c3fa1-388e-4598-b8c4-937f71f07fc5.png 404 reporter generated: /home/cmd/scripts/NoSmoke/web/reports/2018-1-8-8-54-45-report.html { raw: 'a href="null" class="top_down"', data: 'a href="null" class="top_down"', type: 'a', name: 'a', attribs: { href: 'null', class: 'top_down' } } http:/m.aicai.com/null <-- GET /2018-1-8-8-54-45/619c3fa1-388e-4598-b8c4-937f71f07fc5.png --> GET /2018-1-8-8-54-45/619c3fa1-388e-4598-b8c4-937f71f07fc5.png 404 <-- GET /2018-1-8-8-54-45/1bcdaae8-3ecb-4019-a028-40cd7e8424ab.png --> GET /2018-1-8-8-54-45/1bcdaae8-3ecb-4019-a028-40cd7e8424ab.png 404 { raw: 'a href="null" class="top_down"', data: 'a href="null" class="top_down"', type: 'a', name: 'a', attribs: { href: 'null', class: 'top_down' } } http:/m.aicai.com/null reporter generated: /home/cmd/scripts/NoSmoke/web/reports/2018-1-8-8-54-45-report.html <-- GET /2018-1-8-8-54-45/d39da196-42ee-4b0e-adb8-84e354ba18b8.png --> GET /2018-1-8-8-54-45/d39da196-42ee-4b0e-adb8-84e354ba18b8.png 404 <-- GET /2018-1-8-8-54-45/d39da196-42ee-4b0e-adb8-84e354ba18b8.png --> GET /2018-1-8-8-54-45/d39da196-42ee-4b0e-adb8-84e354ba18b8.png 404 { raw: 'a href="/m/userCenter.do?agentId=14759&vt=5" class="top_my"', data: 'a href="/m/userCenter.do?agentId=14759&vt=5" class="top_my"', type: 'a', name: 'a', attribs: { href: '/m/userCenter.do?agentId=14759&vt=5', class: 'top_my' } } http:/m.aicai.com/m/userCenter.do?agentId=14759&vt=5 reporter generated: /home/cmd/scripts/NoSmoke/web/reports/2018-1-8-8-54-45-report.html <-- GET /2018-1-8-8-54-45/881ebc14-e53e-4168-9c52-3251b2e7761e.png --> GET /2018-1-8-8-54-45/881ebc14-e53e-4168-9c52-3251b2e7761e.png 404 { raw: 'a name="go_top"', data: 'a name="go_top"', type: 'a', name: 'a', attribs: { name: 'go_top' } } <-- GET /2018-1-8-8-54-45/881ebc14-e53e-4168-9c52-3251b2e7761e.png --> GET /2018-1-8-8-54-45/881ebc14-e53e-4168-9c52-3251b2e7761e.png 404 reporter generated: /home/cmd/scripts/NoSmoke/web/reports/2018-1-8-8-54-45-report.html <-- GET /2018-1-8-8-54-45/881ebc14-e53e-4168-9c52-3251b2e7761e.png --> GET /2018-1-8-8-54-45/881ebc14-e53e-4168-9c52-3251b2e7761e.png 404 <-- GET /2018-1-8-8-54-45/881ebc14-e53e-4168-9c52-3251b2e7761e.png --> GET /2018-1-8-8-54-45/881ebc14-e53e-4168-9c52-3251b2e7761e.png 404 reporter generated: /home/cmd/scripts/NoSmoke/web/reports/2018-1-8-8-54-45-report.html <-- GET /2018-1-8-8-54-45/881ebc14-e53e-4168-9c52-3251b2e7761e.png --> GET /2018-1-8-8-54-45/881ebc14-e53e-4168-9c52-3251b2e7761e.png 404 <-- GET /2018-1-8-8-54-45/881ebc14-e53e-4168-9c52-3251b2e7761e.png --> GET /2018-1-8-8-54-45/881ebc14-e53e-4168-9c52-3251b2e7761e.png 404 reporter generated: /home/cmd/scripts/NoSmoke/web/reports/2018-1-8-8-54-45-report.html <-- GET /2018-1-8-8-54-45/881ebc14-e53e-4168-9c52-3251b2e7761e.png --> GET /2018-1-8-8-54-45/881ebc14-e53e-4168-9c52-3251b2e7761e.png 404 <-- GET /2018-1-8-8-54-45/881ebc14-e53e-4168-9c52-3251b2e7761e.png --> GET /2018-1-8-8-54-45/881ebc14-e53e-4168-9c52-3251b2e7761e.png 404 reporter generated: /home/cmd/scripts/NoSmoke/web/reports/2018-1-8-8-54-45-report.html <-- GET /2018-1-8-8-54-45/881ebc14-e53e-4168-9c52-3251b2e7761e.png --> GET /2018-1-8-8-54-45/881ebc14-e53e-4168-9c52-3251b2e7761e.png 404 <-- GET /2018-1-8-8-54-45/881ebc14-e53e-4168-9c52-3251b2e7761e.png --> GET /2018-1-8-8-54-45/881ebc14-e53e-4168-9c52-3251b2e7761e.png 404 reporter generated: /home/cmd/scripts/NoSmoke/web/reports/2018-1-8-8-54-45-report.html <-- GET /2018-1-8-8-54-45/881ebc14-e53e-4168-9c52-3251b2e7761e.png --> GET /2018-1-8-8-54-45/881ebc14-e53e-4168-9c52-3251b2e7761e.png 404 ^C

macaca server Log cmd@TR:~$ macaca server --verbose

index.js:18:12 [master] pid:13769 webdriver server start with config: { port: 3456, verbose: true, always: true, ip: '192.168.66.113', host: 'TR', loaded_time: '2018-01-08 08:54:40' } middlewares.js:17:10 [master] pid:13769 base middlewares attached router.js:133:10 [master] pid:13769 router set webdriver sdk launched responseHandler.js:11:12 [master] pid:13769 Recieve HTTP Request from Client[2018-01-08 08:54:46]: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"platformName":"Desktop","browserName":"Electron","url":"http://m.aicai.com/m/register.do?agentId=1&vt=5"}} session.js:47:10 [master] pid:13769 Creating session, sessionId: 45774d38-7cd6-44ec-b2bc-fd423e953850. responseHandler.js:49:14 [master] pid:13769 Send HTTP Respone to Client[2018-01-08 08:54:49]: {"sessionId":"45774d38-7cd6-44ec-b2bc-fd423e953850","status":0,"value":"{\"platformName\":\"Desktop\",\"browserName\":\"Electron\",\"url\":\"http://m.aicai.com/m/register.do?agentId=1&vt=5\"}"} responseHandler.js:11:12 [master] pid:13769 Recieve HTTP Request from Client[2018-01-08 08:54:49]: method: POST url: /wd/hub/session/45774d38-7cd6-44ec-b2bc-fd423e953850/url, jsonBody: {"url":"http://m.aicai.com/m/register.do?agentId=1&vt=5"} responseHandler.js:49:14 [master] pid:13769 Send HTTP Respone to Client[2018-01-08 08:54:50]: {"sessionId":"45774d38-7cd6-44ec-b2bc-fd423e953850","status":0,"value":null} responseHandler.js:11:12 [master] pid:13769 Recieve HTTP Request from Client[2018-01-08 08:54:56]: method: GET url: /wd/hub/session/45774d38-7cd6-44ec-b2bc-fd423e953850/source, jsonBody: {} responseHandler.js:49:14 [master] pid:13769 Send HTTP Respone to Client[2018-01-08 08:54:56]: {"sessionId":"45774d38-7cd6-44ec-b2bc-fd423e953850","status":0,"value":"\"<link href=\\"https://rm.aicai.com/wap5/js/??plugins/lhgdialog/skins/chrome.css\\" rel=\\"stylesheet\\" id=\\"lhgdialoglink\\">\n \t\t\n\n\n\n\t\t\n\t\t<meta charset=\\"utf-8\\">\n\t\t<meta http-equiv=\\"Content-Type\\" content=\\"application/xhtml+xml; charset=utf-8\\">\n\t\t<meta http-equiv=\\"Cache-Control\\" content=\\"no-cache\\">\n\t\t<meta http-equiv=\\"Pragma\\" content=..."} responseHandler.js:11:12 [master] pid:13769 Recieve HTTP Request from Client[2018-01-08 08:54:56]: method: GET url: /wd/hub/session/45774d38-7cd6-44ec-b2bc-fd423e953850/url, jsonBody: {} responseHandler.js:49:14 [master] pid:13769 Send HTTP Respone to Client[2018-01-08 08:54:56]: {"sessionId":"45774d38-7cd6-44ec-b2bc-fd423e953850","status":0,"value":"\"http://m.aicai.com/m/register.do?agentId=1&vt=5\""} responseHandler.js:11:12 [master] pid:13769 Recieve HTTP Request from Client[2018-01-08 08:54:56]: method: GET url: /wd/hub/session/45774d38-7cd6-44ec-b2bc-fd423e953850/source, jsonBody: {} responseHandler.js:49:14 [master] pid:13769 Send HTTP Respone to Client[2018-01-08 08:54:56]: {"sessionId":"45774d38-7cd6-44ec-b2bc-fd423e953850","status":0,"value":"\"<link href=\\"https://rm.aicai.com/wap5/js/??plugins/lhgdialog/skins/chrome.css\\" rel=\\"stylesheet\\" id=\\"lhgdialoglink\\">\n \t\t\n\n\n\n\t\t\n\t\t<meta charset=\\"utf-8\\">\n\t\t<meta http-equiv=\\"Content-Type\\" content=\\"application/xhtml+xml; charset=utf-8\\">\n\t\t<meta http-equiv=\\"Cache-Control\\" content=\\"no-cache\\">\n\t\t<meta http-equiv=\\"Pragma\\" content=..."} responseHandler.js:11:12 [master] pid:13769 Recieve HTTP Request from Client[2018-01-08 08:54:56]: method: GET url: /wd/hub/session/45774d38-7cd6-44ec-b2bc-fd423e953850/url, jsonBody: {} responseHandler.js:49:14 [master] pid:13769 Send HTTP Respone to Client[2018-01-08 08:54:56]: {"sessionId":"45774d38-7cd6-44ec-b2bc-fd423e953850","status":0,"value":"\"http://m.aicai.com/m/register.do?agentId=1&vt=5\""} responseHandler.js:11:12 [master] pid:13769 Recieve HTTP Request from Client[2018-01-08 08:54:56]: method: GET url: /wd/hub/session/45774d38-7cd6-44ec-b2bc-fd423e953850/source, jsonBody: {} responseHandler.js:49:14 [master] pid:13769 Send HTTP Respone to Client[2018-01-08 08:54:56]: {"sessionId":"45774d38-7cd6-44ec-b2bc-fd423e953850","status":0,"value":"\"<link href=\\"https://rm.aicai.com/wap5/js/??plugins/lhgdialog/skins/chrome.css\\" rel=\\"stylesheet\\" id=\\"lhgdialoglink\\">\n \t\t\n\n\n\n\t\t\n\t\t<meta charset=\\"utf-8\\">\n\t\t<meta http-equiv=\\"Content-Type\\" content=\\"application/xhtml+xml; charset=utf-8\\">\n\t\t<meta http-equiv=\\"Cache-Control\\" content=\\"no-cache\\">\n\t\t<meta http-equiv=\\"Pragma\\" content=..."} responseHandler.js:11:12 [master] pid:13769 Recieve HTTP Request from Client[2018-01-08 08:54:56]: method: GET url: /wd/hub/session/45774d38-7cd6-44ec-b2bc-fd423e953850/url, jsonBody: {} responseHandler.js:49:14 [master] pid:13769 Send HTTP Respone to Client[2018-01-08 08:54:56]: {"sessionId":"45774d38-7cd6-44ec-b2bc-fd423e953850","status":0,"value":"\"http://m.aicai.com/m/register.do?agentId=1&vt=5\""} responseHandler.js:11:12 [master] pid:13769 Recieve HTTP Request from Client[2018-01-08 08:54:56]: method: GET url: /wd/hub/session/45774d38-7cd6-44ec-b2bc-fd423e953850/source, jsonBody: {} responseHandler.js:49:14 [master] pid:13769 Send HTTP Respone to Client[2018-01-08 08:54:56]: {"sessionId":"45774d38-7cd6-44ec-b2bc-fd423e953850","status":0,"value":"\"<link href=\\"https://rm.aicai.com/wap5/js/??plugins/lhgdialog/skins/chrome.css\\" rel=\\"stylesheet\\" id=\\"lhgdialoglink\\">\n \t\t\n\n\n\n\t\t\n\t\t<meta charset=\\"utf-8\\">\n\t\t<meta http-equiv=\\"Content-Type\\" content=\\"application/xhtml+xml; charset=utf-8\\">\n\t\t<meta http-equiv=\\"Cache-Control\\" content=\\"no-cache\\">\n\t\t<meta http-equiv=\\"Pragma\\" content=..."} responseHandler.js:11:12 [master] pid:13769 Recieve HTTP Request from Client[2018-01-08 08:54:56]: method: GET url: /wd/hub/session/45774d38-7cd6-44ec-b2bc-fd423e953850/url, jsonBody: {} responseHandler.js:49:14 [master] pid:13769 Send HTTP Respone to Client[2018-01-08 08:54:56]: {"sessionId":"45774d38-7cd6-44ec-b2bc-fd423e953850","status":0,"value":"\"http://m.aicai.com/m/register.do?agentId=1&vt=5\""} responseHandler.js:11:12 [master] pid:13769 Recieve HTTP Request from Client[2018-01-08 08:54:56]: method: GET url: /wd/hub/session/45774d38-7cd6-44ec-b2bc-fd423e953850/source, jsonBody: {} responseHandler.js:49:14 [master] pid:13769 Send HTTP Respone to Client[2018-01-08 08:54:56]: {"sessionId":"45774d38-7cd6-44ec-b2bc-fd423e953850","status":0,"value":"\"<link href=\\"https://rm.aicai.com/wap5/js/??plugins/lhgdialog/skins/chrome.css\\" rel=\\"stylesheet\\" id=\\"lhgdialoglink\\">\n \t\t\n\n\n\n\t\t\n\t\t<meta charset=\\"utf-8\\">\n\t\t<meta http-equiv=\\"Content-Type\\" content=\\"application/xhtml+xml; charset=utf-8\\">\n\t\t<meta http-equiv=\\"Cache-Control\\" content=\\"no-cache\\">\n\t\t<meta http-equiv=\\"Pragma\\" content=..."} responseHandler.js:11:12 [master] pid:13769 Recieve HTTP Request from Client[2018-01-08 08:54:56]: method: GET url: /wd/hub/session/45774d38-7cd6-44ec-b2bc-fd423e953850/url, jsonBody: {} responseHandler.js:49:14 [master] pid:13769 Send HTTP Respone to Client[2018-01-08 08:54:56]: {"sessionId":"45774d38-7cd6-44ec-b2bc-fd423e953850","status":0,"value":"\"http://m.aicai.com/m/register.do?agentId=1&vt=5\""} responseHandler.js:11:12 [master] pid:13769 Recieve HTTP Request from Client[2018-01-08 08:54:56]: method: GET url: /wd/hub/session/45774d38-7cd6-44ec-b2bc-fd423e953850/source, jsonBody: {} responseHandler.js:49:14 [master] pid:13769 Send HTTP Respone to Client[2018-01-08 08:54:56]: {"sessionId":"45774d38-7cd6-44ec-b2bc-fd423e953850","status":0,"value":"\"<link href=\\"https://rm.aicai.com/wap5/js/??plugins/lhgdialog/skins/chrome.css\\" rel=\\"stylesheet\\" id=\\"lhgdialoglink\\">\n \t\t\n\n\n\n\t\t\n\t\t<meta charset=\\"utf-8\\">\n\t\t<meta http-equiv=\\"Content-Type\\" content=\\"application/xhtml+xml; charset=utf-8\\">\n\t\t<meta http-equiv=\\"Cache-Control\\" content=\\"no-cache\\">\n\t\t<meta http-equiv=\\"Pragma\\" content=..."} responseHandler.js:11:12 [master] pid:13769 Recieve HTTP Request from Client[2018-01-08 08:54:56]: method: GET url: /wd/hub/session/45774d38-7cd6-44ec-b2bc-fd423e953850/url, jsonBody: {} responseHandler.js:49:14 [master] pid:13769 Send HTTP Respone to Client[2018-01-08 08:54:56]: {"sessionId":"45774d38-7cd6-44ec-b2bc-fd423e953850","status":0,"value":"\"http://m.aicai.com/m/register.do?agentId=1&vt=5\""} responseHandler.js:11:12 [master] pid:13769 Recieve HTTP Request from Client[2018-01-08 08:54:56]: method: GET url: /wd/hub/session/45774d38-7cd6-44ec-b2bc-fd423e953850/source, jsonBody: {} responseHandler.js:49:14 [master] pid:13769 Send HTTP Respone to Client[2018-01-08 08:54:56]: {"sessionId":"45774d38-7cd6-44ec-b2bc-fd423e953850","status":0,"value":"\"<link href=\\"https://rm.aicai.com/wap5/js/??plugins/lhgdialog/skins/chrome.css\\" rel=\\"stylesheet\\" id=\\"lhgdialoglink\\">\n \t\t\n\n\n\n\t\t\n\t\t<meta charset=\\"utf-8\\">\n\t\t<meta http-equiv=\\"Content-Type\\" content=\\"application/xhtml+xml; charset=utf-8\\">\n\t\t<meta http-equiv=\\"Cache-Control\\" content=\\"no-cache\\">\n\t\t<meta http-equiv=\\"Pragma\\" content=..."} responseHandler.js:11:12 [master] pid:13769 Recieve HTTP Request from Client[2018-01-08 08:54:56]: method: GET url: /wd/hub/session/45774d38-7cd6-44ec-b2bc-fd423e953850/url, jsonBody: {} responseHandler.js:49:14 [master] pid:13769 Send HTTP Respone to Client[2018-01-08 08:54:56]: {"sessionId":"45774d38-7cd6-44ec-b2bc-fd423e953850","status":0,"value":"\"http://m.aicai.com/m/register.do?agentId=1&vt=5\""} responseHandler.js:11:12 [master] pid:13769 Recieve HTTP Request from Client[2018-01-08 08:54:56]: method: POST url: /wd/hub/session/45774d38-7cd6-44ec-b2bc-fd423e953850/url, jsonBody: {"url":"http:/m.aicai.com/index.do;jsessionid=EB407A917663DC636ECD110EEA80F654.c54?agentId=1&vt=5"} responseHandler.js:49:14 [master] pid:13769 Send HTTP Respone to Client[2018-01-08 08:54:56]: {"sessionId":"45774d38-7cd6-44ec-b2bc-fd423e953850","status":0,"value":null} responseHandler.js:11:12 [master] pid:13769 Recieve HTTP Request from Client[2018-01-08 08:54:56]: method: GET url: /wd/hub/session/45774d38-7cd6-44ec-b2bc-fd423e953850/screenshot, jsonBody: {} responseHandler.js:49:14 [master] pid:13769 Send HTTP Respone to Client[2018-01-08 08:54:56]: {"sessionId":"45774d38-7cd6-44ec-b2bc-fd423e953850","status":0,"value":"\"iVBORw0KGgoAAAANSUhEUgAAAyAAAAJYCAYAAACadoJwAAAMbklEQVR4nO3XMQHAIBDAwFL/at8AuAgDdwqyZs3M/gAAAAL/7QAAAOAdBgQAAMgYEAAAIGNAAACAjAEBAAAyBgQAAMgYEAAAIGNAAACAjAEBAAAyBgQAAMgYEAAAIGNAAACAjAEBAAAyBgQAAMgYEAAAIGNAAACAjAEBAAAyBgQAAMgYEAAAIGNAAACAjAEBAAAyBgQAAMgYEAAAIGNAAACAjAEBAAAyBgQAAMgYEAAAIGNAAACAjAEBAAAyBgQAAMgYEAAAIGNAAACAjAEBAAAyBgQAAMgYEAAAIGNAAACAjAEBAAAyBgQAAMgYEAAAIGNAAACAjAEBAAAyBgQAAMgYEAAA..."} responseHandler.js:11:12 [master] pid:13769 Recieve HTTP Request from Client[2018-01-08 08:55:02]: method: GET url: /wd/hub/session/45774d38-7cd6-44ec-b2bc-fd423e953850/source, jsonBody: {} responseHandler.js:49:14 [master] pid:13769 Send HTTP Respone to Client[2018-01-08 08:55:02]: {"sessionId":"45774d38-7cd6-44ec-b2bc-fd423e953850","status":0,"value":"\"<html lang=\\"en\\">\n<meta charset=\\"utf-8\\">\n<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui\\">\n<meta name=\\"apple-mobile-web-app-capable\\" content=\\"yes\\">\n<meta name=\\"apple-mobile-web-app-status-bar-style\\" content=\\"black\\">\n<meta name=\\"format-detection\\" content=\\"telephone=no\\">\n<meta http-equiv=\\"cleart..."} responseHandler.js:11:12 [master] pid:13769 Recieve HTTP Request from Client[2018-01-08 08:55:02]: method: GET url: /wd/hub/session/45774d38-7cd6-44ec-b2bc-fd423e953850/url, jsonBody: {} responseHandler.js:49:14 [master] pid:13769 Send HTTP Respone to Client[2018-01-08 08:55:02]: {"sessionId":"45774d38-7cd6-44ec-b2bc-fd423e953850","status":0,"value":"\"http://m.aicai.com/index.do;jsessionid=EB407A917663DC636ECD110EEA80F654.c54?agentId=1&amp;vt=5\""} responseHandler.js:11:12 [master] pid:13769 Recieve HTTP Request from Client[2018-01-08 08:55:02]: method: POST url: /wd/hub/session/45774d38-7cd6-44ec-b2bc-fd423e953850/url, jsonBody: {"url":"http:/m.aicai.com/null"} responseHandler.js:49:14 [master] pid:13769 Send HTTP Respone to Client[2018-01-08 08:55:03]: {"sessionId":"45774d38-7cd6-44ec-b2bc-fd423e953850","status":0,"value":null} responseHandler.js:11:12 [master] pid:13769 Recieve HTTP Request from Client[2018-01-08 08:55:03]: method: GET url: /wd/hub/session/45774d38-7cd6-44ec-b2bc-fd423e953850/screenshot, jsonBody: {} responseHandler.js:49:14 [master] pid:13769 Send HTTP Respone to Client[2018-01-08 08:55:03]: {"sessionId":"45774d38-7cd6-44ec-b2bc-fd423e953850","status":0,"value":"\"iVBORw0KGgoAAAANSUhEUgAAAyAAAAJYCAYAAACadoJwAAAMbklEQVR4nO3XMQHAIBDAwFL/at8AuAgDdwqyZs3M/gAAAAL/7QAAAOAdBgQAAMgYEAAAIGNAAACAjAEBAAAyBgQAAMgYEAAAIGNAAACAjAEBAAAyBgQAAMgYEAAAIGNAAACAjAEBAAAyBgQAAMgYEAAAIGNAAACAjAEBAAAyBgQAAMgYEAAAIGNAAACAjAEBAAAyBgQAAMgYEAAAIGNAAACAjAEBAAAyBgQAAMgYEAAAIGNAAACAjAEBAAAyBgQAAMgYEAAAIGNAAACAjAEBAAAyBgQAAMgYEAAAIGNAAACAjAEBAAAyBgQAAMgYEAAAIGNAAACAjAEBAAAyBgQAAMgYEAAA..."} responseHandler.js:11:12 [master] pid:13769 Recieve HTTP Request from Client[2018-01-08 08:55:09]: method: GET url: /wd/hub/session/45774d38-7cd6-44ec-b2bc-fd423e953850/source, jsonBody: {} responseHandler.js:49:14 [master] pid:13769 Send HTTP Respone to Client[2018-01-08 08:55:09]: {"sessionId":"45774d38-7cd6-44ec-b2bc-fd423e953850","status":0,"value":"\"<html lang=\\"en\\">\n<meta charset=\\"utf-8\\">\n<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui\\">\n<meta name=\\"apple-mobile-web-app-capable\\" content=\\"yes\\">\n<meta name=\\"apple-mobile-web-app-status-bar-style\\" content=\\"black\\">\n<meta name=\\"format-detection\\" content=\\"telephone=no\\">\n<meta http-equiv=\\"cleart..."} responseHandler.js:11:12 [master] pid:13769 Recieve HTTP Request from Client[2018-01-08 08:55:09]: method: GET url: /wd/hub/session/45774d38-7cd6-44ec-b2bc-fd423e953850/url, jsonBody: {} responseHandler.js:49:14 [master] pid:13769 Send HTTP Respone to Client[2018-01-08 08:55:09]: {"sessionId":"45774d38-7cd6-44ec-b2bc-fd423e953850","status":0,"value":"\"http://m.aicai.com/null\""} responseHandler.js:11:12 [master] pid:13769 Recieve HTTP Request from Client[2018-01-08 08:55:09]: method: POST url: /wd/hub/session/45774d38-7cd6-44ec-b2bc-fd423e953850/url, jsonBody: {"url":"http:/m.aicai.com/null"} responseHandler.js:49:14 [master] pid:13769 Send HTTP Respone to Client[2018-01-08 08:55:09]: {"sessionId":"45774d38-7cd6-44ec-b2bc-fd423e953850","status":0,"value":null} responseHandler.js:11:12 [master] pid:13769 Recieve HTTP Request from Client[2018-01-08 08:55:09]: method: GET url: /wd/hub/session/45774d38-7cd6-44ec-b2bc-fd423e953850/screenshot, jsonBody: {} responseHandler.js:49:14 [master] pid:13769 Send HTTP Respone to Client[2018-01-08 08:55:09]: {"sessionId":"45774d38-7cd6-44ec-b2bc-fd423e953850","status":0,"value":"\"iVBORw0KGgoAAAANSUhEUgAAAyAAAAJYCAYAAACadoJwAAAMbklEQVR4nO3XMQHAIBDAwFL/at8AuAgDdwqyZs3M/gAAAAL/7QAAAOAdBgQAAMgYEAAAIGNAAACAjAEBAAAyBgQAAMgYEAAAIGNAAACAjAEBAAAyBgQAAMgYEAAAIGNAAACAjAEBAAAyBgQAAMgYEAAAIGNAAACAjAEBAAAyBgQAAMgYEAAAIGNAAACAjAEBAAAyBgQAAMgYEAAAIGNAAACAjAEBAAAyBgQAAMgYEAAAIGNAAACAjAEBAAAyBgQAAMgYEAAAIGNAAACAjAEBAAAyBgQAAMgYEAAAIGNAAACAjAEBAAAyBgQAAMgYEAAAIGNAAACAjAEBAAAyBgQAAMgYEAAA..."} responseHandler.js:11:12 [master] pid:13769 Recieve HTTP Request from Client[2018-01-08 08:55:15]: method: GET url: /wd/hub/session/45774d38-7cd6-44ec-b2bc-fd423e953850/source, jsonBody: {} responseHandler.js:49:14 [master] pid:13769 Send HTTP Respone to Client[2018-01-08 08:55:15]: {"sessionId":"45774d38-7cd6-44ec-b2bc-fd423e953850","status":0,"value":"\"<html lang=\\"en\\">\n<meta charset=\\"utf-8\\">\n<meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui\\">\n<meta name=\\"apple-mobile-web-app-capable\\" content=\\"yes\\">\n<meta name=\\"apple-mobile-web-app-status-bar-style\\" content=\\"black\\">\n<meta name=\\"format-detection\\" content=\\"telephone=no\\">\n<meta http-equiv=\\"cleart..."} responseHandler.js:11:12 [master] pid:13769 Recieve HTTP Request from Client[2018-01-08 08:55:15]: method: GET url: /wd/hub/session/45774d38-7cd6-44ec-b2bc-fd423e953850/url, jsonBody: {} responseHandler.js:49:14 [master] pid:13769 Send HTTP Respone to Client[2018-01-08 08:55:15]: {"sessionId":"45774d38-7cd6-44ec-b2bc-fd423e953850","status":0,"value":"\"http://m.aicai.com/null\""} responseHandler.js:11:12 [master] pid:13769 Recieve HTTP Request from Client[2018-01-08 08:55:15]: method: POST url: /wd/hub/session/45774d38-7cd6-44ec-b2bc-fd423e953850/url, jsonBody: {"url":"http:/m.aicai.com/m/userCenter.do?agentId=14759&vt=5"} responseHandler.js:49:14 [master] pid:13769 Send HTTP Respone to Client[2018-01-08 08:55:16]: {"sessionId":"45774d38-7cd6-44ec-b2bc-fd423e953850","status":0,"value":null} responseHandler.js:11:12 [master] pid:13769 Recieve HTTP Request from Client[2018-01-08 08:55:16]: method: GET url: /wd/hub/session/45774d38-7cd6-44ec-b2bc-fd423e953850/screenshot, jsonBody: {} responseHandler.js:49:14 [master] pid:13769 Send HTTP Respone to Client[2018-01-08 08:55:16]: {"sessionId":"45774d38-7cd6-44ec-b2bc-fd423e953850","status":0,"value":"\"iVBORw0KGgoAAAANSUhEUgAAAyAAAAJYCAYAAACadoJwAAAgAElEQVR4nOzdeZyNZePH8c85Z87sG2bB2MYyZAvZWkh6iFJJkqIiFC2KevIoFZK0yM+jRUKekiJLRCJKlizJTsYMM9bBGLMxM2fOcv/+mJyc5swYS4P6vl8vr2au+7qv67pP/jhf13KbNtSqZSAiIiIiIlIKzJd7ACIiIiIi8s+hACIiIiIiIqVGAUREREREREpN8QHErHwiIiIiIiKXjk9RF0JatKDKiy8S/8gjODIy3OWxo0fjPHWKA6NHu8vCb72V0BYtMJzOkvVqMmG2Wtk/ahQYpbsH3rd8eSr078/+4cMv6H6T1Ypht2ONjMSemlq4gtkMLtdFjlJERERE5O+pyABi..."} responseHandler.js:11:12 [master] pid:13769 Recieve HTTP Request from Client[2018-01-08 08:55:22]: method: GET url: /wd/hub/session/45774d38-7cd6-44ec-b2bc-fd423e953850/source, jsonBody: {} responseHandler.js:49:14 [master] pid:13769 Send HTTP Respone to Client[2018-01-08 08:55:22]: {"sessionId":"45774d38-7cd6-44ec-b2bc-fd423e953850","status":0,"value":"\"<html xmlns=\\"http://www.w3.org/1999/xhtml\\"><script type=\\"text/javascript\\" src=\\"/js/jsencrypt-rsa.js?vt=3\\">\n<script type=\\"text/javascript\\">\n\tfunction checkForm(){\n\t\tvar pwd = document.getElementById(\\"passwordid\\").value;\n\t\tif(pwd==null || pwd==\\"\\"){\n\t\t\treturn false;\n\t\t}\n\t\tpwd = encryptPwd(pwd);\n\t\tdocument.getElementById(\\"encryptPwd\\").value = pwd;..."} responseHandler.js:11:12 [master] pid:13769 Recieve HTTP Request from Client[2018-01-08 08:55:22]: method: GET url: /wd/hub/session/45774d38-7cd6-44ec-b2bc-fd423e953850/url, jsonBody: {} responseHandler.js:49:14 [master] pid:13769 Send HTTP Respone to Client[2018-01-08 08:55:22]: {"sessionId":"45774d38-7cd6-44ec-b2bc-fd423e953850","status":0,"value":"\"http://m.aicai.com/m/login.do?agentId=14759&vt=3\""}

xudafeng commented 6 years ago

@Archer456 Android里的Web只能用chrome远程调试协议,不支持electron。用你文章里总结的macaca-chrome。