Unable to connect RSeleneum server

I installed RSelenium package first.....but when took next step like-
RSelenium::checkForServer()........i got error like-
Error: checkForServer is now defunct. Users in future can find the function
in file.path(find.package("RSelenium"), "examples/serverUtils"). The
recommended way to run a selenium server is via Docker. Alternatively
see the RSelenium::rsDriver function.
again i put.......RSelenium::rsDriver().....but some error is coming like this....
Error in java_check() :
PATH to JAVA not found. Please check JAVA is installed.
what to do??

Did you install the java package using:

install.packages("rJava")

If so and it still does not work you might have a version issue. If you use the 64 bit version of R you also need the 64 bit version of Java installed. See below post for more info:

If you managed to install Java you can run a browser with the below command:

rD <- rsDriver(browser = 'firefox')
remDr <- rD$client

remDr$navigate("https://www.google.com")

In the example a firefox browser is opened but you can also use "chrome", "phantomjs" or
"internet explorer".

For more examples see:

https://ropensci.org/tutorials/rselenium_tutorial/

1 Like

Thank you so much for your support.....but now i am getting another error like-
rd<-rsDriver("chrome")
Error: port should be an integer value.
what is the issue now??

You need to specify chrome is the browser. Try:

rD <- rsDriver(browser = 'chrome')

If that doesn't work make sure you have the latest version of chrome installed and specifically set the port:

rD <- rsDriver(browser = 'chrome', port = 4444)

tried, but now it is showing that port should be in integer.Like-

rD <- rsDriver(browser = 'chrome', port = 4444)
Error: port should be an integer value.
what to do??

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.