0

I understand that the following line of code places the latest chromedriver file in ~/.cache/selenium...

WebDriverManager.chromedriver().setup();

My question: Is there a way to configure this to download the file to a specific directory?

As an example, say I have a directory named "MyChromeDriver". I would like WebDriverManager to place the chromedriver file inside "MyChromeDriver" without all the extra sub-directories.

Thank you in advance!

Boni García
  • 4,618
  • 5
  • 28
  • 44
FredH
  • 1
  • 1
  • 2

1 Answers1

1

Invoke WebDriverManager as follows:

WebDriverManager.chromedriver().cachePath("MyChromeDriver").avoidOutputTree().setup();
Boni García
  • 4,618
  • 5
  • 28
  • 44