How to run Google Chrome in AWS Lambda for Selenium tests using Java + ChromeDriver How to run Google Chrome in AWS Lambda for Selenium tests using Java + ChromeDriver selenium selenium

How to run Google Chrome in AWS Lambda for Selenium tests using Java + ChromeDriver


The method setBinary() of ChromeOptions is supposed to be used to set the path to the Chrome browser. The problem is you are using to set the path where chromedriver (i.e. the binary file required by Selenium WebDriver to communicate with Chrome) is downloaded by WebDriverManager. Therefore, you need to remove that line:

options.setBinary("/tmp");