【发布时间】:2016-11-18 01:15:45
【问题描述】:
我的守夜人测试已经在 PC 上运行。我想在 iOS 和 Android 的真实设备上运行它们。
我在nightwatch.json 文件中添加了以下更改:
"test_settings" : {
"default" : {
"launch_url" : "https://www.google.com",
"selenium_port" : 4444,
"selenium_host" : "localhost",
"silent": true,
"screenshots" : {
"enabled" : true,
"on_failure" : true,
"on_error" : false,
"path" : "./screenshot"
},
"log_screenshot_data": false,
"desiredCapabilities": {
"browserName": "chrome"
},
"globals": {
"windowWidth" : "1400",
"windowHeight" : "1050"
},
"exclude": ["TEMPLATE.js"]
},
"android" : {
"launch_url" : "http://localhost:4723/wd/hub",
"selenium_port" : 4723,
"selenium_host" : "localhost",
"silent": true,
"desiredCapabilities": {
"browserName": "chrome",
"platformName": "ANDROID",
"deviceName": "R32D202V6MX"
}
},
"ios" : {
"launch_url" : "http://localhost:4723/wd/hub",
"selenium_port" : 4444,
"selenium_host" : "localhost",
"silent": true,
"desiredCapabilities": {
"browserName": "Safari",
"platformName": "iOS",
"platformVersion": "9.2",
"deviceName": ""
}
},
我如何调用android 设置test_settings 在PC 上运行测试时自动获取。
我使用以下命令运行测试:
node nightwatch.js -t tests/firstTest.js如何在android上运行同样的测试?
更多信息:
- Appium 在 127.0.0.1:4723 上运行。 http://127.0.0.1:4723/ 给出“那个 URL 没有映射到有效的 JSONWP 资源”
- 设备是 Samsung Nexus 10" tab v 4.4
- PC 是 Windows 7
【问题讨论】:
标签: android ios nightwatch.js