I am new to automation testing. I followed the steps given on " http://webdriver.io/guide.html " everything went great . I installed node.js selenium-server-standalone-3.5.3 geckodriver chromeriver
My script goes like this:
var webdriverio = require(.\\webdriverio');
var options = {
desiredCapabilities: {
browserName: 'C:\Program Files\Mozilla Firefox\firefox'
}
};
webdriverio
.remote(options)
.init()
.url('http://www.google.com')
.getTitle().then(function(title) {
console.log('Title was: ' + title);
})
.end()
.catch(function(err) {
console.log(err);
});
This works well but it opens chrome browser where as I want to open firefox.
将 browserName: 'C:\\Program Files\\Mozilla Firefox\\firefox' 切换为 browserName: 'firefox'
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.