Webdriver选项“ proxy”未在我的nightwatch.json文件中初始化。如果正确设置了代理选项,则需要帮助。
尝试添加以下几行,但没有成功。
“ proxy”:“ socks5://142.120.97.70:1080”
“ proxy”:“袜子://142.120.97.70:1080”
“ proxy”:“ //142.120.97.70:1080”
“ src_folders”:[“测试”],
"webdriver": {
"start_process" : true,
"server_path": "lib/drivers/geckodriver.exe",
"port":4444,
"cli_args": [
"--log", "debug"],
"proxy": "socks5//142.120.97.70:1080"
},
"test_settings" : {
"default" : {
"desiredCapabilities": {
"browserName" : "firefox",
"acceptInsecureCerts": true
}
}
}}
测试脚本应在默认代理上使用socks5代理。