macacajs / macaca-ios Goto Github PK
View Code? Open in Web Editor NEWMacaca iOS driver
Home Page: https://macacajs.github.io/zh/guide/versioning.html
License: MIT License
Macaca iOS driver
Home Page: https://macacajs.github.io/zh/guide/versioning.html
License: MIT License
第一个问题:
Lines 325 to 335 in bed355b
这里的代码为什么是 先 killAll 然后再 shutdown 当前设备,这样终端会报一个错误:
macaca-ios.js:334:12 [master] pid:9086 Shutdown simulator 5BBB462A-B202-41B1-A64F-4AAE008D958A failed Error: Command failed: xcrun simctl shutdown "5BBB462A-B202-41B1-A64F-4AAE008D958A"
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=164):
Unable to shutdown device in current state: Shutdown
这里感觉没有必要 killAll 去关掉开着的所有 模拟器。
第二个问题:
Line 341 in bed355b
首先,如果电脑上有 beta 版 xcode 10,这个 open 不会启动指定的模拟器,而是启动了一个默认的模拟器。
另外,Simulator 里的 boot 和 open,这两个方法为什么用不同性质的命令来实现?这里如果调用 boot 方法是不是就木有问题了。
可能是我有其他的因素没有考虑?所以这里是有原因才这样用的吗?
When I try to switch multiple webviews and get the self.driver.title, OR self.driver.current_url, it always got the latest view's info.
http://localhost:9222/json
[{
"devtoolsFrontendUrl": "/devtools/devtools.html?ws=localhost:9222/devtools/page/1",
"faviconUrl": "",
"thumbnailUrl": "/thumb/",
"title": "JSContext",
"url": "",
"webSocketDebuggerUrl": "ws://localhost:9222/devtools/page/1",
"appId": "PID:11418"
},{
"devtoolsFrontendUrl": "/devtools/devtools.html?ws=localhost:9222/devtools/page/2",
"faviconUrl": "",
"thumbnailUrl": "/thumb/https://www.XXX.com/AAA",
"title": "AAA",
"url": "/https://www.XXX.com/AAA",
"webSocketDebuggerUrl": "ws://localhost:9222/devtools/page/2",
"appId": "PID:11420"
},{
"devtoolsFrontendUrl": "",
"faviconUrl": "",
"thumbnailUrl": "/thumb/https://www.XXX.com/BBB",
"title": "BBB",
"url": "/https://www.XXX.com/BBB",
"webSocketDebuggerUrl": "ws://localhost:9222/devtools/page/3",
"appId": "PID:11424"
},{
"devtoolsFrontendUrl": "/devtools/devtools.html?ws=localhost:9222/devtools/page/4",
"faviconUrl": "",
"thumbnailUrl": "/thumb/https://www.XXX.com/CCC",
"title": "CCC",
"url": "/https://www.XXX.com/CCC",
"webSocketDebuggerUrl": "ws://localhost:9222/devtools/page/4",
"appId": "PID:11421"
},{
"devtoolsFrontendUrl": "/devtools/devtools.html?ws=localhost:9222/devtools/page/7",
"faviconUrl": "",
"thumbnailUrl": "/thumb/https://www.XXX.com/DDD",
"title": "DDD",
"url": "https://www.XXX.com/DDD"",
"webSocketDebuggerUrl": "ws://localhost:9222/devtools/page/7",
"appId": "PID:11422"
},{
"devtoolsFrontendUrl": "/devtools/devtools.html?ws=localhost:9222/devtools/page/10",
"faviconUrl": "",
"thumbnailUrl": "/thumb/https://www.XXX.com/EEE",
"title": "EEE",
"url": "https://www.XXX.com/EEE",
"webSocketDebuggerUrl": "ws://localhost:9222/devtools/page/10",
"appId": "PID:11423"
},{
"devtoolsFrontendUrl": "/devtools/devtools.html?ws=localhost:9222/devtools/page/13",
"faviconUrl": "",
"thumbnailUrl": "/thumb/about:blank",
"title": "",
"url": "about:blank",
"webSocketDebuggerUrl": "ws://localhost:9222/devtools/page/13",
"appId": "PID:11444"
}]
macaca server log
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
responseHandler.js:49:14 [master] pid:25470 Send HTTP Respone to Client[2019-05-17 14:22:29]: {"sessionId":"17d912bf-bd1c-4162-992a-264c91d594dc","status":0,"value":"["NATIVE_APP","WEBVIEW_2","WEBVIEW_3","WEBVIEW_4","WEBVIEW_7","WEBVIEW_10","WEBVIEW_13"]"}
responseHandler.js:11:12 [master] pid:25470 Recieve HTTP Request from Client[2019-05-17 14:22:29]: method: POST url: /wd/hub/session/17d912bf-bd1c-4162-992a-264c91d594dc/context, jsonBody: {"name":"WEBVIEW_10"}
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
client.js:100:14 [master] pid:25470 Disconnecting from Remote debugger
client.js:36:16 [master] pid:25470 Remote debugger websocket disconnected with url: ws://localhost:9222/devtools/page/13
client.js:31:16 [master] pid:25470 Remote debugger connected to websocket url: ws://localhost:9222/devtools/page/10
responseHandler.js:49:14 [master] pid:25470 Send HTTP Respone to Client[2019-05-17 14:22:29]: {"sessionId":"17d912bf-bd1c-4162-992a-264c91d594dc","status":0,"value":null}
responseHandler.js:11:12 [master] pid:25470 Recieve HTTP Request from Client[2019-05-17 14:22:31]: method: GET url: /wd/hub/session/17d912bf-bd1c-4162-992a-264c91d594dc/url, jsonBody: {}
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
responseHandler.js:49:14 [master] pid:25470 Send HTTP Respone to Client[2019-05-17 14:22:31]: {"sessionId":"17d912bf-bd1c-4162-992a-264c91d594dc","status":0,"value":""about:blank""}
responseHandler.js:11:12 [master] pid:25470 Recieve HTTP Request from Client[2019-05-17 14:22:33]: method: GET url: /wd/hub/session/17d912bf-bd1c-4162-992a-264c91d594dc/contexts, jsonBody: {}
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
responseHandler.js:49:14 [master] pid:25470 Send HTTP Respone to Client[2019-05-17 14:22:33]: {"sessionId":"17d912bf-bd1c-4162-992a-264c91d594dc","status":0,"value":"["NATIVE_APP","WEBVIEW_2","WEBVIEW_3","WEBVIEW_4","WEBVIEW_7","WEBVIEW_10","WEBVIEW_13"]"}
responseHandler.js:11:12 [master] pid:25470 Recieve HTTP Request from Client[2019-05-17 14:22:33]: method: POST url: /wd/hub/session/17d912bf-bd1c-4162-992a-264c91d594dc/context, jsonBody: {"name":"WEBVIEW_7"}
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
client.js:100:14 [master] pid:25470 Disconnecting from Remote debugger
client.js:36:16 [master] pid:25470 Remote debugger websocket disconnected with url: ws://localhost:9222/devtools/page/10
client.js:31:16 [master] pid:25470 Remote debugger connected to websocket url: ws://localhost:9222/devtools/page/7
responseHandler.js:49:14 [master] pid:25470 Send HTTP Respone to Client[2019-05-17 14:22:33]: {"sessionId":"17d912bf-bd1c-4162-992a-264c91d594dc","status":0,"value":null}
responseHandler.js:11:12 [master] pid:25470 Recieve HTTP Request from Client[2019-05-17 14:22:35]: method: GET url: /wd/hub/session/17d912bf-bd1c-4162-992a-264c91d594dc/url, jsonBody: {}
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
responseHandler.js:49:14 [master] pid:25470 Send HTTP Respone to Client[2019-05-17 14:22:35]: {"sessionId":"17d912bf-bd1c-4162-992a-264c91d594dc","status":0,"value":""about:blank""}
responseHandler.js:11:12 [master] pid:25470 Recieve HTTP Request from Client[2019-05-17 14:22:37]: method: GET url: /wd/hub/session/17d912bf-bd1c-4162-992a-264c91d594dc/contexts, jsonBody: {}
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
responseHandler.js:49:14 [master] pid:25470 Send HTTP Respone to Client[2019-05-17 14:22:37]: {"sessionId":"17d912bf-bd1c-4162-992a-264c91d594dc","status":0,"value":"["NATIVE_APP","WEBVIEW_2","WEBVIEW_3","WEBVIEW_4","WEBVIEW_7","WEBVIEW_10","WEBVIEW_13"]"}
responseHandler.js:11:12 [master] pid:25470 Recieve HTTP Request from Client[2019-05-17 14:22:37]: method: POST url: /wd/hub/session/17d912bf-bd1c-4162-992a-264c91d594dc/context, jsonBody: {"name":"WEBVIEW_4"}
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
client.js:100:14 [master] pid:25470 Disconnecting from Remote debugger
client.js:36:16 [master] pid:25470 Remote debugger websocket disconnected with url: ws://localhost:9222/devtools/page/7
client.js:31:16 [master] pid:25470 Remote debugger connected to websocket url: ws://localhost:9222/devtools/page/4
responseHandler.js:49:14 [master] pid:25470 Send HTTP Respone to Client[2019-05-17 14:22:37]: {"sessionId":"17d912bf-bd1c-4162-992a-264c91d594dc","status":0,"value":null}
responseHandler.js:11:12 [master] pid:25470 Recieve HTTP Request from Client[2019-05-17 14:22:39]: method: GET url: /wd/hub/session/17d912bf-bd1c-4162-992a-264c91d594dc/url, jsonBody: {}
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
responseHandler.js:49:14 [master] pid:25470 Send HTTP Respone to Client[2019-05-17 14:22:39]: {"sessionId":"17d912bf-bd1c-4162-992a-264c91d594dc","status":0,"value":""about:blank""}
responseHandler.js:11:12 [master] pid:25470 Recieve HTTP Request from Client[2019-05-17 14:22:41]: method: GET url: /wd/hub/session/17d912bf-bd1c-4162-992a-264c91d594dc/contexts, jsonBody: {}
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
responseHandler.js:49:14 [master] pid:25470 Send HTTP Respone to Client[2019-05-17 14:22:41]: {"sessionId":"17d912bf-bd1c-4162-992a-264c91d594dc","status":0,"value":"["NATIVE_APP","WEBVIEW_2","WEBVIEW_3","WEBVIEW_4","WEBVIEW_7","WEBVIEW_10","WEBVIEW_13"]"}
responseHandler.js:11:12 [master] pid:25470 Recieve HTTP Request from Client[2019-05-17 14:22:41]: method: POST url: /wd/hub/session/17d912bf-bd1c-4162-992a-264c91d594dc/context, jsonBody: {"name":"WEBVIEW_3"}
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
client.js:100:14 [master] pid:25470 Disconnecting from Remote debugger
client.js:36:16 [master] pid:25470 Remote debugger websocket disconnected with url: ws://localhost:9222/devtools/page/4
client.js:31:16 [master] pid:25470 Remote debugger connected to websocket url: ws://localhost:9222/devtools/page/3
responseHandler.js:49:14 [master] pid:25470 Send HTTP Respone to Client[2019-05-17 14:22:41]: {"sessionId":"17d912bf-bd1c-4162-992a-264c91d594dc","status":0,"value":null}
responseHandler.js:11:12 [master] pid:25470 Recieve HTTP Request from Client[2019-05-17 14:22:43]: method: GET url: /wd/hub/session/17d912bf-bd1c-4162-992a-264c91d594dc/url, jsonBody: {}
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
responseHandler.js:49:14 [master] pid:25470 Send HTTP Respone to Client[2019-05-17 14:22:43]: {"sessionId":"17d912bf-bd1c-4162-992a-264c91d594dc","status":0,"value":""about:blank""}
responseHandler.js:11:12 [master] pid:25470 Recieve HTTP Request from Client[2019-05-17 14:22:45]: method: GET url: /wd/hub/session/17d912bf-bd1c-4162-992a-264c91d594dc/contexts, jsonBody: {}
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
responseHandler.js:49:14 [master] pid:25470 Send HTTP Respone to Client[2019-05-17 14:22:45]: {"sessionId":"17d912bf-bd1c-4162-992a-264c91d594dc","status":0,"value":"["NATIVE_APP","WEBVIEW_2","WEBVIEW_3","WEBVIEW_4","WEBVIEW_7","WEBVIEW_10","WEBVIEW_13"]"}
responseHandler.js:11:12 [master] pid:25470 Recieve HTTP Request from Client[2019-05-17 14:22:45]: method: POST url: /wd/hub/session/17d912bf-bd1c-4162-992a-264c91d594dc/context, jsonBody: {"name":"WEBVIEW_2"}
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
client.js:100:14 [master] pid:25470 Disconnecting from Remote debugger
client.js:36:16 [master] pid:25470 Remote debugger websocket disconnected with url: ws://localhost:9222/devtools/page/3
client.js:31:16 [master] pid:25470 Remote debugger connected to websocket url: ws://localhost:9222/devtools/page/2
responseHandler.js:49:14 [master] pid:25470 Send HTTP Respone to Client[2019-05-17 14:22:45]: {"sessionId":"17d912bf-bd1c-4162-992a-264c91d594dc","status":0,"value":null}
responseHandler.js:11:12 [master] pid:25470 Recieve HTTP Request from Client[2019-05-17 14:22:47]: method: GET url: /wd/hub/session/17d912bf-bd1c-4162-992a-264c91d594dc/url, jsonBody: {}
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
remote-debugger.js:65:12 [master] pid:25470 Getting pages from url: http://localhost:9222/json
responseHandler.js:49:14 [master] pid:25470 Send HTTP Respone to Client[2019-05-17 14:22:47]: {"sessionId":"17d912bf-bd1c-4162-992a-264c91d594dc","status":0,"value":""about:blank""}
responseHandler.js:11:12 [master] pid:25470 Recieve HTTP Request from Client[2019-05-17 14:22:47]: method: DELETE url: /wd/hub/session/17d912bf-bd1c-4162-992a-264c91d594dc, jsonBody: {}
macaca-ios.js:381:10 [master] pid:25470 Stoping iOS driver...
git clone下来本地尝试安装,发现是xctest-wd
更新到了1.4.7都安装不上了,npm i [email protected]就没问题。
** TEST BUILD FAILED **
fs.js:115
throw err;
^
Error: ENOENT: no such file or directory, scandir '/usr/local/lib/node_modules/macaca-ios/node_modules/xctestwd/XCTestWD/build/Build/Products'
at Object.readdirSync (fs.js:783:3)
at Object.<anonymous> (/usr/local/lib/node_modules/macaca-ios/node_modules/xctestwd/scripts/install.js:116:17)
at Module._compile (internal/modules/cjs/loader.js:688:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
at startup (internal/bootstrap/node.js:285:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node ./scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/miratto/.npm/_logs/2019-03-15T10_08_40_139Z-debug.log
如图所示
@xudafeng
iOS真机使用uirecord 失败,不能安装应用。
iOS真机使用uirecord 失败,不能安装应用。
uirecord 日志:
录制服务器监听在端口: 9765 录制浏览器已开启 手机打开失败,请检查macaca是否配置正确? Failed to install app 'com.xx.xx', please install the app manually.
macaca server 日志:
index.js:18:12 [master] pid:45146 webdriver server start with config:
{ port: 4444,
verbose: true,
always: true,
ip: '10.12.54.132',
host: 'zhangtianchendeMacBook-Pro.local',
loaded_time: '2017-11-20 14:45:24' }
middlewares.js:17:10 [master] pid:45146 base middlewares attached
router.js:133:10 [master] pid:45146 router set
webdriver sdk launched
responseHandler.js:11:12 [master] pid:45146 Recieve HTTP Request from Client[2017-11-20 14:45:44]: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"platformName":"iOS","app":"/Users/ztcq/Desktop/ipa/d.zip","udid":"199ce7e631ef60de8b6702******"}}
session.js:47:10 [master] pid:45146 Creating session, sessionId: aa0310ab-e463-4699-b097-b58a9ecb827b.
ios-deploy
helper.js:162:12 [master] pid:45146 Unzipping local app form /Users/ztcq/Desktop/ipa/d.zip
CFBundleIdentifier is com.xx.xx
Get bundleId com.xx.xx from plist /var/folders/ds/d_bj7pq17q72td0wdkyvg_km0000gn/T/Payload/Info.plist
macaca-ios.js:279:12 [master] pid:45146 App 'com.xx.xx' is not installed.
macaca-ios.js:284:14 [master] pid:45146 this.device.installUntilReady is not a function
responseHandler.js:56:12 [master] pid:45146 Send Error Respone to Client: UnknownError: Failed to install app 'com.xx.xx', please install the app manually.
responseHandler.js:62:14 [master] pid:45146 UnknownError: Failed to install app 'com.xx.xx', please install the app manually.
at IOS.startRealDevice (/usr/local/lib/node_modules/macaca-ios/lib/macaca-ios.js:285:13)
at IOS.startRealDevice.next ()
at onFulfilled (/usr/local/lib/node_modules/macaca-cli/node_modules/co/index.js:65:19)
at
我注意到报错中的一句话:
this.device.installUntilReady is not a function
底层使用selenium-atom接口来实现 每次返回的都是整个elements数组
完全没有使用wda提供的有关elements接口 导致在某个元素集下查找功能缺失
也不能使用查找条件来查找
iOS的Alert无法自动点掉
1.我看了官网的例子,例子代码driver的下方,有一个webview()和native()这两个方法,这两方法在官网的api中也没有介绍,求这两个方法的含义。
2.在学习过程中,我没有找到像appium那样可以校验期望结果的方法,如assetText(),现在是否支持这个功能?
3.在demo中的login方法代码内,有一个waitForElementByXPath方法,我在官网的api中未找到这个方法,能给一个这个方法详细的说明么?
4.在官网的api中我看到setImplicitWaitTimeout()这个方法,这个方法仅仅是设置智能等待的时间,还是可以直接实现智能等待的功能呢?
https://github.com/macacajs/macaca-ios/blob/master/lib/macaca-ios.js#L253 按官方文档,当reuse=1时,253行的break需要考虑删掉
if (isInstalled) {
logger.debug(App "${bundleId}" is already installed.
);
switch (reuse) {
case 0:
case 1:
if (app) {
yield this.device.uninstall(bundleId);
logger.debug(Uninstall app "${bundleId}".
);
}
break; // 当reuse参数为1时,按官方文档,这儿的break应该不需要
case 2:
if (app) {
try {
yield this.device.install(app);
logger.debug(Install app '${bundleId}' successfully.
);
} catch (err) {
logger.debug(err.message);
throw new errors.UnknownError(Failed to install app '${bundleId}', please install the app manually.
);
}
}
break;
case 3:
// Keep app state. Do nothing.
break;
}
}
如题,macaca-ios依赖的xctestwd
版本是1及以上,每次xctestwd
在npm升级后,重新安装macaca-ios依赖的xctestwd
也强制升级了。如果xctestwd的修改有问题,可能就挂了。
可以固定xctestwd
版本的话,至少不会经常受影响。
xctest-client.js:156:14 [master] pid:20740
Testing failed:
Test target WebDriverAgentRunner encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted)xctest-client.js:156:14 [master] pid:20740 ** TEST FAILED **
xctest-client.js:164:14 [master] pid:20740 xctest client exit with code: 65, signal: null
相同的用例,9.3的真机可以执行。10系统的模拟器也可以执行。
已重装libimobiledevice : brew reinstall libimobiledevice
已给webdriveragentrunner重签名:修改webdriveragentrunner Product Bundle Identifier
已添加WebDriverAgentLib和WebDriverAgentRunner两个targets的证书,选择一个team
方法都试过,还是不行。
Environment: Version 12.0 (12A7209)
I build and run the XCTestWD project in node_module after I run DEVELOPMENT_TEAM_ID=XXXXXXXX npm i macaca-ios -g
in terminal, it comes out this error.
It seems that the framework linked in project was compiled with Swift5.2 and not be compatible with Swift5.3(Xcode 12). So, how can I fix the issue?
ld: framework not found MobileDevice
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
The following build commands failed:
Ld build/Release/devicelog normal x86_64
(1 failure)
npm ERR! Cannot read property 'pause' of undefined
npm ERR! code ELIFECYCLE
npm ERR! errno 65
npm ERR! [email protected] preinstall: xcodebuild
npm ERR! Exit status 65
npm ERR!
npm ERR! Failed at the [email protected] preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
有在本地尝试这个 macacajs/app-inspector@043a28d 的方法 ,但会报另一个错误
>> macaca-ios.js:175:12 [master] pid:46225 Trying to start xctestwd server...
>> xctest-client.js:283:14 [master] pid:46225 xcode version: 10.2.1
>> XCTestWD version: 1.4.18
>> xctest-client.js:230:20 [master] pid:46225 please check project: /usr/local/lib/node_modules/macaca-ios/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
>> xctest-client.js:230:20 [master] pid:46225 please check project: /usr/local/lib/node_modules/macaca-ios/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
>> xctest-client.js:227:20 [master] pid:46225 hitted for default mode
>> xctestwd start with port: 8900
>> proxy.js:55:14 [master] pid:46225 Proxy: /wd/hub/session:POST to http://127.0.0.1:8900/wd/hub/session:POST with body: {"desiredCapabilities":{"bundleId":"com.xxx.xxx","platformName":"iOS"}}
>> xctest-client.js:230:20 [master] pid:46225 please check project: /usr/local/lib/node_modules/macaca-ios/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
>> proxy.js:63:22 [master] pid:46225 xctest client proxy error with: Error: connect ECONNREFUSED 127.0.0.1:8900
>> xctest-client.js:230:20 [master] pid:46225 please check project: /usr/local/lib/node_modules/macaca-ios/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
>> proxy.js:63:22 [master] pid:46225 xctest client proxy error with: Error: connect ECONNREFUSED 127.0.0.1:8900
>> proxy.js:63:22 [master] pid:46225 xctest client proxy error with: Error: connect ECONNREFUSED 127.0.0.1:8900
>> proxy.js:63:22 [master] pid:46225 xctest client proxy error with: Error: connect ECONNREFUSED 127.0.0.1:8900
>> proxy.js:63:22 [master] pid:46225 xctest client proxy error with: Error: connect ECONNREFUSED 127.0.0.1:8900
>> proxy.js:63:22 [master] pid:46225 xctest client proxy error with: Error: connect ECONNREFUSED 127.0.0.1:8900
>> proxy.js:63:22 [master] pid:46225 xctest client proxy error with: Error: connect ECONNREFUSED 127.0.0.1:8900
>> proxy.js:63:22 [master] pid:46225 xctest client proxy error with: Error: connect ECONNREFUSED 127.0.0.1:8900
>> proxy.js:63:22 [master] pid:46225 xctest client proxy error with: Error: connect ECONNREFUSED 127.0.0.1:8900
>> proxy.js:63:22 [master] pid:46225 xctest client proxy error with: Error: connect ECONNREFUSED 127.0.0.1:8900
>> proxy.js:63:22 [master] pid:46225 xctest client proxy error with: Error: connect ECONNREFUSED 127.0.0.1:8900
>> xctest-client.js:309:14 [master] pid:46225 Fail to start xctest: Error: connect ECONNREFUSED 127.0.0.1:8900
>> xctest-client.js:322:14 [master] pid:46225 killing runnerProc pid: 47530
>> responseHandler.js:56:12 [master] pid:46225 Send Error Respone to Client: Error: connect ECONNREFUSED 127.0.0.1:8900
>> responseHandler.js:62:14 [master] pid:46225 Error: connect ECONNREFUSED 127.0.0.1:8900
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1056:14)
Error: connect ECONNREFUSED 127.0.0.1:8900
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1056:14)
>> xctest-client.js:242:16 [master] pid:46225 xctest client exit with code: null, signal: SIGKILL
使用 macaca-ios 无法操作 hybrid 页面;
无法找到 hybrid 页面上的 webview 元素;
请问可以解决么?
it('#4 should go into webview', function() {
return driver
.webview()
.elementById('pushView') //此处id如何获得?
.tap()
.sleep(5000)
.webview()
.elementById('popView') //此处id如何获得?
.tap()
.sleep(5000)
.takeScreenshot();
});
** BUILD SUCCEEDED **
[email protected] install /usr/local/lib/node_modules/macaca-ios/node_modules/devicelog
node ./scripts/build.js
[email protected] install /usr/local/lib/node_modules/macaca-ios/node_modules/xctestwd
node ./scripts/install.js
start to mv /usr/local/lib/node_modules/macaca-ios/node_modules/xctestwd-frameworks/Carthage /usr/local/lib/node_modules/macaca-ios/node_modules/xctestwd
Carthage is existed: /usr/local/lib/node_modules/macaca-ios/node_modules/xctestwd/Carthage
preparing xctestrun build
User defaults from command line:
IDEDerivedDataPathOverride = /usr/local/lib/node_modules/macaca-ios/node_modules/xctestwd/XCTestWD/build
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
{ platform:iOS Simulator, OS:latest, name:iPhone 7 }
The requested device could not be found because no available devices matched the request.
Ineligible destinations for the "XCTestWDUITests" scheme:
{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Generic iOS Device }
{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Generic iOS Simulator Device }
fs.js:126
throw err;
^
Error: ENOENT: no such file or directory, scandir '/usr/local/lib/node_modules/macaca-ios/node_modules/xctestwd/XCTestWD/build/Build/Products'
at Object.readdirSync (fs.js:795:3)
at Object. (/usr/local/lib/node_modules/macaca-ios/node_modules/xctestwd/scripts/install.js:119:17)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:643:32)
at Function.Module._load (internal/modules/cjs/loader.js:556:12)
at Function.Module.runMain (internal/modules/cjs/loader.js:839:10)
at internal/main/run_main_module.js:17:11 {
errno: -2,
syscall: 'scandir',
code: 'ENOENT',
path: '/usr/local/lib/node_modules/macaca-ios/node_modules/xctestwd/XCTestWD/build/Build/Products'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node ./scripts/install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in
macaca-doctor version: 2.0.18
Node.js checklist:
node env: /usr/local/bin/node
node version: v12.6.0
iOS checklist:
macOS version: 10.14.4
Xcode Command Line Tools is ready, version: 2354.
xcodebuild version: 10.3
iproxy[usbmuxd] is installed at:/usr/local/bin/iproxy
ios_webkit_debug_proxy is installed at:/usr/local/bin/ios_webkit_debug_proxy
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.