Search code examples
rrselenium

R: Selenium server signals port = 4567 is already in use


It seems this is a recurrent question, but I haven't found the solution to my problem.

I am running the following:

link <- 'https://www.google.com/'

rD <- rsDriver(verbose = TRUE,
               port=4567L, 
               browserName = 'chrome', 
               chromever = '83.0.4103.39',
               check = TRUE)
remDr <- rD$client
remDr$navigate(link)

When I run the first I get the error:

Error in wdman::selenium(port = port, verbose = verbose, version = version, : Selenium server signals port = 4567 is already in use.

I have the chrome driver in the same folder as of my R project.

How do I make this work? I have literally followed the documentation and nothing seems to work!!!

Any help would be much appreciated!

Br


Solution

  • I had this issue recently, I just assigned a random portal number i.e. port= 4837L and then reran the code and it worked fine for me. Hope it works!