0

While using WebDriverManager in AWS Lambda (Java) to have chrome driver, getting the exception java.lang.IllegalArgumentException: Parameter 'directory' is not a directory: /home/sbx_user1051/.m2/repository/webdriver

I have tried setting the target argument for webdrivermanager 1. System.setProperty("wdm.targetPath", "/tmp/driver/binaries"); 2. WebDriverManager.chromedriver().targetPath("/tmp").setup(); Both ways not working.

WebDriverManager.chromedriver().targetPath("/tmp").setup(); webDriver = new ChromeDriver(getLambdaChromeOptions(proxy));

   <dependency>
        <groupId>io.github.bonigarcia</groupId>
        <artifactId>webdrivermanager</artifactId>
        <version>2.2.1</version>
    </dependency>

1 Answers1

1

Version 2.2.1 is very old. Update to the latest one (e.g. 5.0.1) and try again.

Boni García
  • 4,618
  • 5
  • 28
  • 44
  • If I upgrade, new errors come 1. Only local connections are allowed. 2. [1559554537.037][SEVERE]: CreatePlatformSocket() returned an error, errno=97: Address family not supported by protocol (97) - This one come recursively – Meenakshi Gupta Jun 03 '19 at 09:37