【发布时间】:2018-08-03 21:51:57
【问题描述】:
我是 NightWatch 的新手,所以我遵循了几个教程,我按照他们所说的做了一切,但现在我得到一个带有标题“数据”的空白页面,而不是我想看到的页面是“@987654321 @"。
这是 json 文件。这个问题似乎与 json 配置有关。有什么帮助吗?非常感谢!
{
"src_folders" : ["tests"],
"output_folder" : "reports",
"selenium": {
"start_process": true,
"start_session" : true,
"server_path": "C:\\Users\\Esau Alvarez\\Desktop\\selenium-server-standalone-3.13.0.jar",
"port": 4444,
"cli_args": {
"webdriver.chrome.driver": "C:\\Users\\Esau Alvarez\\Desktop\\chromedriver.exe"
}
},
"test_settings" : {
"default": {
"launch_url": "https://www.gandhi.com.mx/",
"screenshots": {
"enabled": false
},
"desiredCapabilities": {
"browserName": "chrome",
"marionette": true
}
},
"chrome" : {
"desiredCapabilities": {
"browserName": "chrome",
"webdriver": {
"server_path": "C:\\Users\\Esau Alvarez\\Desktop\\NightWatch\\chromedriver.exe"
}
}
}
}
}
这是我的测试文件
module.exports = {
"Test": function (browser) {
browser
.windowMaximize()
.url("https://www.gandhi.com.mx/")
.waitForElementVisible('body', 1000)
}
}
【问题讨论】:
标签: javascript web nightwatch.js