-1

I am executing my Selenium tests on AWS EC2 Ubuntu instance from Windows OS using RemoteWebDriver.

Below is the Selenium code:

WebDriverManager.chromedriver().setup();
ChromeOptions co = new ChromeOptions();
WebDriver driver = new RemoteWebDriver(new URL("http://18.118.213.92:4444/wd/hub"), co);

But it is throwing the below error:

io.github.bonigarcia.wdm.config.WebDriverManagerException: java.nio.file.NoSuchFileException: /tmp/15425606072528251971
    at testing.RediffLoginTest.bmeth(RediffLoginTest.java:55)
Caused by: java.nio.file.NoSuchFileException: /tmp/15425606072528251971
    at testing.RediffLoginTest.bmeth(RediffLoginTest.java:55)

Normally, when we execute tests on Windows OS, then the above code downloads the browser drivers automatically to the cache folder in user directory.

Any help is appreciated.

1 Answers1

0

You are using remote browsers, so you don't need WebDriverManager (i.e., remove line WebDriverManager.chromedriver().setup();).

Boni García
  • 4,618
  • 5
  • 28
  • 44
  • Can you please explain in detail as to why should I remove this line for remote browsers and how to make use of WebDriverManager in such a case ? – Sandesh Sawant Sep 21 '21 at 17:28
  • WebDriverManager is typically used to resolver driver for local browsers. If you are consuming remote browser (e.g., with Selenium Grid), the drivers should be resolved in the Selenium Server side. – Boni García Sep 21 '21 at 18:03
  • So, in case of Selenium Grid, there is no way to manage browser binaries using WebDriverManager. That means I have to manually download the drivers on the node machines and give the driver path while registering the nodes ? – Sandesh Sawant Sep 21 '21 at 18:12
  • https://bonigarcia.dev/webdrivermanager/#selenium-grid – Boni García Sep 22 '21 at 11:29