Click here to Skip to main content
15,067,832 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello, today my tests stoped run on the Grid. I see this error:
Message: System.InvalidOperationException : Unable to create new service: ChromeDriverService
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'KBP1-LHP-F87043', ip: '10.0.75.1', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.2'
Driver info: driver.version: unknown (SessionNotCreated)


What I have tried:

This is how I run Grid and Nodes on my local machine.
Run HUB
java -jar selenium-server-standalone-3.141.59.jar -role hub -port 4445

Run default NODES
java -jar selenium-server-standalone-3.141.59.jar -role node -hub http://localhost:4445/grid/

I checked console in browser here: http://localhost:4445/grid/console
This is my C# code for initialize browser:
C#
[Binding]
    public sealed class Hooks
    {
        private IWebDriver _driver;
        private IObjectContainer _objectContainer;

        public Hooks(IObjectContainer objectContainer)
        {
            _objectContainer = objectContainer;
        }

        [BeforeScenario]

        public void BeforeScenario()
        {
            // Selenium Grid
            ChromeOptions options = new ChromeOptions();
            _driver = new RemoteWebDriver(new Uri("http://localhost:4445/wd/hub"), options);
            _objectContainer.RegisterInstanceAs(_driver);
        }
    }
Posted
Updated 24-Nov-19 20:01pm
v2

1 solution

Now everything works. I use for run nodes such code:

-Dwebdriver.chrome.driver="C:\Program Files\chromedriver_win32\chromedriver.exe" -Dwebdriver.gecko.driver="C:\Program Files\geckodriver-v0.24.0-win64\geckodriver.exe" -jar selenium-server-standalone-3.141.59.jar -role node -hub "http://localhost:4444/grid/register/"
   
Comments
Member 14667003 25-Nov-19 2:02am
   
The above solution worked for me thank you

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900