Answer the question
In order to leave comments, you need to log in
How to properly setup Selenium for WebdriverIO?
I'm trying to run functional tests on Webdriverio on my local machine, and when I run the tests, I get an error:
no such session
(Driver info: chromedriver=2.28.455520 (cc17746adff54984afff480136733114c6b3704b),platform=Windows NT 10.0.10586 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 4 milliseconds
Build info: version: '3.3.1', revision: '5234b32', time: '2017-03-10 09:04:52 -0800'
System info: host: 'WORKPC', ip: '192.168.1.38', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_65'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{message=unknown error: cannot find Chrome binary
(Driver info: chromedriver=2.28.455520 (cc17746adff54984afff480136733114c6b3704b),platform=Windows NT 10.0.10586 x86_64), platform=ANY}]
Session ID: ab5e4cf0ae668ab0a68849a648def5e6
npm i -g selenium-standalone webdriverio
selenium-standalone install && selenium-standalone start
wdio config
wdio -c wdio.conf.js
exports.config = {
specs: [
'./test/**/*.js'
],
maxInstances: 10,
capabilities: [{
maxInstances: 5,
browserName: 'chrome'
}],
sync: true,
logLevel: 'verbose',
coloredLogs: true,
bail: 0,
screenshotPath: './test/error-shots',
baseUrl: 'http://localhost:3000',
waitforTimeout: 10000,
connectionRetryTimeout: 90000,
connectionRetryCount: 3,
services: ['selenium-standalone'],
framework: 'mocha',
reporters: ['dot'],
mochaOpts: {
ui: 'bdd'
}
}
describe('DuckDuckGo search', function() {
it('searches for WebdriverIO', function() {
browser.url('https://duckduckgo.com/');
browser.setValue('#search_form_input_homepage', 'WebdriverIO');
browser.click('#search_button_homepage');
var title = browser.getTitle();
console.log('Title is: ' + title);
// outputs: "Title is: WebdriverIO (Software) at DuckDuckGo"
});
});
Answer the question
In order to leave comments, you need to log in
webdriver.io/guide.html
You probably missed that you need to install a driver for the browser in which you will be testing.
https://sites.google.com/a/chromium.org/chromedriv... - chromium driver
https://github.com/mozilla/geckodriver/releases - for ff
Selenium can't do it without a driver
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question