設定ファイルでどのブラウザが使用されているかを知りたい、ブラウザ上でいくつかの操作を行う必要があることに基づいて、それは可能ですか? someTest.jsファイルのconfigファイルからbrowserNameを取得したいとします。Config.jsファイルからどのように機能(browsername)を読むことができますか?
exports.config = {
allScriptsTimeout: 11000,
specs: [
'../endtoendtests/demo.js',
'../endtoendtests/someTest.js'
],
capabilities: {
'browserName': 'chrome'
},
framework: 'jasmine',
jasmineNodeOpts: {
defaultTimeoutInterval: 30000
},
onPrepare: function() {
browser.manage().window().maximize(); // maximize the browser before executing the feature files
}
};
これはあなたを助けるhttp://stackoverflow.com/questions/23872955/get-the-current-browser-name-in-protractor-test –
これは多くの他の質問で答えられました。 - http://stackoverflow.com/questions/42414538/how-to-read-parameters-value-present-in-conf-js-file-of-protractor-in-specs/42418510#42418510 – AdityaReddy
@KishanPatelありがとうございます。私のために働いています.. – Basil