0

I have installed Botium-Binding and prepared my machine to have installed with selenium-standalone server as per the documentation in https://github.com/codeforequity-at/botium-connector-webdriverio. Once everything is setup i have added below capabilites to the botium.json file in samples/custom scripts folder.

"WEBDRIVERIO_OPTIONS": {    
        "capabilities": {
          "browserName": "chrome",
          
        }
      }

Then i have run the command npm install && npm run mocha to trigger the runner.

All i could see is that the Webdriver session is being created and terminated with the error below:

WebdriverIO Plugin Sample
Starting ChromeDriver 92.0.4515.107 (87a818b10553a07434ea9e2b6dccf3cbe7895134-refs/branch-heads/4515@{#1634}) on port 44325
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
    1) "before each" hook for "contractcancellation"


  0 passing (9s)
  1 failing

  1) WebdriverIO Plugin Sample
       "before each" hook for "contractcancellation":
     Error: WebDriver error on startup: Failed to create session.
Make sure to connect to valid hostname:port or the port is not in use.
If you use a grid server 
Make sure to add vendor prefix like "goog:", "appium:", "moz:", etc to non W3C capabilities.
See more https://www.w3.org/TR/webdriver/#capabilities

tried adding Hostname, port, platform to the capabilities but of no use. Looking for some help on this to get me unblocked.

  • seems like the browser isn't launching... you might need to give the path to chrome.exe to the webdriver. – pcalkins Aug 25 '21 at 20:56
  • Thanks for the response @pcalkins. I am making this setup on a MAC. In which section should i be adding the path to the chromedriver? Should i need to add "WEBDRIVERIO_START_CHROMEDRIVER_ARGS" in the capabilities? – Kumar Punnana Aug 26 '21 at 05:02
  • not familiar with "botium" so you might want to check into their code or tutorials on that. – pcalkins Aug 26 '21 at 16:15
  • thank you `@pcalkins`. `@florian treml`, Could you please help me in unblocking from this scenario as i am totally new to botium. – Kumar Punnana Aug 27 '21 at 07:35
  • First thing to check is your chrome version. Make sure it's v92, since you chromedriver is that version and it's fairly picky about versions. For configuring webdriver through botium, consult the botium page(s), documentation. – pcalkins Aug 27 '21 at 16:10

1 Answers1

1

You have to follow the instructions to install a chromedriver version that matches your Chrome version (as pcalkins wrote above).

It this doesnt help I recommend to enable verbose logging to get more insights on whats happening. You may post the log output here for further investigation.

Florian Treml
  • 1,315
  • 2
  • 7
  • 10