0

I try to startServer() in RSelenium

but I receive this error:

Error in startServer():
Selenium binary error: Unable to start Selenium binary. Check java is installed.

I used cmd command java -version and I have java

java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

What else should I do in order to start the server?

Elen
  • 39
  • 7
  • This error indicates the selenium server binary was unable to start. You can start the binary manually see http://rpubs.com/johndharrison/12843 or consider running a Docker container see http://rpubs.com/johndharrison/RSelenium-Docker. – jdharrison Sep 13 '16 at 10:17

2 Answers2

1

Search for the jar file within RSelenium package (directory) and execute it from the console with:

 java -jar selenium-server-standalone-x.xx.x.jar

After that you can skip the startServer() line

osvaldortega
  • 100
  • 8
0

You can start selenium server with also with parameters:

java -jar ~/selenium/selenium-server-standalone-3.4.0.jar -host localhost -port 4444 -role hub

and You can also start with bunch of parameters from eg. json config file

java -jar ~/selenium/selenium-server-standalone-3.3.1.jar -role hub -hubConfig $config"

and here is json config example:

{
  "_comment": "Configuration for local Hub",
  "host": "127.0.0.1",
  "port": 4444,
  "maxSessions": 5,
  "cleanupCycle": 5000,
  "timeout": 30000,
  "throwOnCapabilityNotPresent": true,
  "nodePolling": 180000,
  "newSessionWaitTimeout": -1,
  "capabilityMatcher": "org.openqa.grid.internal.utils.DefaultCapabilityMatcher"
}
Kovacic
  • 1,473
  • 6
  • 21