0
ウェブサイトのテストに夜間監視を使用しています。以下は私の設定ファイルです。私はブラウザとしてphantomjsを使用したいので、ブラウザを開かずに実行することができます。しかし、私がnightwatch -c integration-tests/nightwatch.json
コマンドでテストを実行すると、常にクロムブラウザが開きます。そして、私はbrowserName
の値を修正しようとしましたが、何を入れても効果がないことがわかりました。私の設定に何か問題はありますか?夜間にウェブブラウザの設定を取得しない理由
{
"src_folders": [
"./integration-tests/tests"
],
"output_folder": "./integration-tests/reports",
"custom_commands_path": "",
"custom_assertions_path": "",
"page_objects_path": "",
"globals_path": "",
"selenium": {
"start_process": false
},
"test_settings": {
"default": {
"launch_url": "http://localhost:9091",
"selenium_port": 9515,
"selenium_host": "localhost",
"default_path_prefix": "",
"silent": true,
"screenshots": {
"enabled": false,
"path": ""
},
"desiredCapabilities": {
"browserName": "phantomjs",
"javascriptEnabled" : true,
"phantomjs.binary.path" :"node_modules/phantomjs",
"phantomjs.cli.args" : []
}
}
}
}
私は "phantomjs.page.settings.userAgent" を追加しようとしました:「Mozillaの/ 5.0(Macintosh版、インテルのMac OS X 10/10_5)AppleWebKit/537.36(GeckoのようなKHTML)Chrome/46.0.2490.80 Safari/537.36 "は設定ファイルにありますが、ブラウザはまだ起動しています。 –