我曾提升環境對我的測試的火狐,Chrome支持等目標瀏覽器必須是一個字符串...(硒,量角器)
我已經安裝:
Node LTS (6.10.0)
Selenium Server Standalone 3.1.0
[email protected]
[email protected]
當我現在想要運行我的測試我收到:
[17:31:32] I/launcher - Running 1 instances of WebDriver
[17:31:32] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
[17:31:32] E/launcher - Error: TypeError: Target browser must be a string, but is <undefined>; did you forget to call forBrowser()?
[...]
[17:31:32] E/launcher - Process exited with error code 100
Process finished with exit code 100
這是什麼意思?
的config.js是:
var TIMEOUT = 10000;
exports.config = {
...
capabilities: [
{
'browserName': 'firefox', //tried as 'firefox', firefox and "firefox"
//'marionette': true //tried true and false
},
],
...
};
也許你正在使用多個'capabilities'或其他'multiCapabilities'? – eLRuLL
不,我唯一的部分是在說明中。還是有另一個地方,我可以配置這個? –
檢查你是否沒有在某處實例化WebDriver()。 – eLRuLL