Link to home
Start Free TrialLog in
Avatar of Ruwenzori Warrior
Ruwenzori Warrior

asked on

Use Selenium CLI to execute a text on Selenium Grid

I have a selenium docker grid on my local machine. I used Selenium IDE to create a .side file, by recording a test. I am using selenium-side-runner, the Selenium CLI to execute the .side test on the Selenium Grid.


When I execute the test on the Grid, I get :

WebDriverError: unknown error: net::ERR_CONNECTION_REFUSED

Avatar of Kimputer
Kimputer

 What was the command, to connect to what server? That server currently doesn't accept your request.
Avatar of Ruwenzori Warrior

ASKER

This was the command:

selenium-side-runner StaffPortalLogin.side --server http://localhost:4444/wd/hub -c "browserName='chrome', goog:chromeOptions.args=[no-sandbox,start-maximized,headless,window-size=1366x768,disable-popup-blocking,disable-dev-shm-usage,dns-prefetch-disable,always-authorize-plugins,disable-gpu,enable-automation,disable-browser-side-navigation,ignore-certificate-errors,disable-extensions,use-gl=egl,single-process,ignore-certificate-errors,allow-running-insecure-content] platform='LINUX'"

Open in new window


The server (hub) is a docker container, running on my local machine on port 4444.

So you're sure on that same machine, a normal browser, would get a page when going to http://localhost:4444/wd/hub ?
This is what I am getting when hitting that page:

User generated image
And this is what I get, when I hit localhost:4444

User generated image
This is the console:


User generated image
As you can see from your first browser screenshot, it ends with an error. So when you use that page to test, the error will also show up. Fix the error on the page, and you'll fix the error with your CLI command.
Did a google search for the error popping up on the hub URL when loaded in browser, came across this:

https://github.com/zalando/zalenium/issues/305
ASKER CERTIFIED SOLUTION
Avatar of Ruwenzori Warrior
Ruwenzori Warrior

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial