1

java version: 1.8

selenium version: latest as of april 2017

Hub/grid has been set up on a different machine which is a ec2 windows instance. A node successfully registers.

No erros on hub and node consoles. I can see the console on the browser with the registered node and browsers exposed.

java -Dwebdriver.gecko.driver=C:\selenium_grid\geckodriver\geckodriver.exe -jar selenium-server-standalone-3.4.0.jar -role hub -host <ipaddress> -port 4444

java -jar selenium-server-standalone-3.4.0.jar -role node -port 5555 -hub http://127.0.0.1:4444/grid/register -browser "browserName=firefox,platform=WINDOWS" -browser "browserName=opera,platform=WINDOWS" -browser "browserName=safari,platform=WINDOWS" -browser "browserName=internet explorer,platform=WINDOWS" -browser "browserName=chrome,platform=WINDOWS"


webdriver = new RemoteWebDriver(seleniumGridURL, desiredCapabilities);

public enum DriverType implements DriverSetup {

FIREFOX {
    public DesiredCapabilities getDesiredCapabilities(Proxy proxySettings) {
        DesiredCapabilities capabilities = DesiredCapabilities.firefox();
        capabilities.setCapability("marionette", true);
        return addProxySettings(capabilities, proxySettings);
    }

    public WebDriver getWebDriverObject(DesiredCapabilities capabilities) {
        return new FirefoxDriver(capabilities);
    }
}}`

Error: driver.version: RemoteWebDriver at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:353) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:159) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:637) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:250) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:236) at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:137) at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:174) at com.website.selenium.config.DriverFactory.instantiateWebDriver(DriverFactory.java:86) at com.website.selenium.config.DriverFactory.getDriver(DriverFactory.java:42) at com.website.selenium.DriverBase.getDriver(DriverBase.java:34) at com.website.selenium.listeners.ScreenshotListener.onTestFailure(ScreenshotListener.java:51) at org.testng.internal.Invoker.runTestListeners(Invoker.java:1716) at org.testng.internal.Invoker.runTestListeners(Invoker.java:1699) at org.testng.internal.Invoker.invokeMethod(Invoker.java:703) at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:851) at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1177) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

org.openqa.selenium.WebDriverException: Unable to parse remote response: Cannot POST /wd/hub/session

Trying to enable debug as suggested:
java -jar selenium-server-standalone-3.4.0.jar -debug -log c:\selenium_grid\grid.log -role node -port 5555 -hub http://127.0.0.1:4444/grid/register -browser "browserName=firefox,platform=WINDOWS" -browser "browserName=opera,platform=WINDOWS" -browser "browserName=safari,platform=WINDOWS" -browser "browserName=internet explorer,platform=WINDOWS" -browser "browserName=chrome,platform=WINDOWS"

Exception in thread "main" com.beust.jcommander.ParameterException: "-debug": couldn't convert "-log" to a boolean

8
  • How are the hug and node started? What do the node and hub logs show? Commented Apr 27, 2017 at 20:02
  • @MarkLapierre I have updated the question above. I dont see any errors regarding those Commented Apr 27, 2017 at 20:14
  • Try with logging and debugging enabled on the node -debug -log path/to/log/file Commented Apr 27, 2017 at 20:24
  • @MarkLapierre Updated my results. couldnt get it to work :-( Commented Apr 27, 2017 at 23:12
  • 1
    Thanks for responses @MarkLapierre. This was a networking issue with aws VPC's and private IP's. It is resolved! Commented May 2, 2017 at 21:11

1 Answer 1

1

This was a networking issue with aws VPC's and private IP's and opening the TCP and UDP ports in windows firewall + modifying sec groups (incoming ports for windows machine) in the EC2 instance.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.