Reputation: 196
I have a test suite for UI testing. The same suite I can run on my local machine and it working fine, but I want to deploy the same suite into AWS Lambda. I tried it but AWS lambda filed to lunch Chrome for testing.
Upvotes: 0
Views: 170
Reputation: 196
After doing a lot of R&D I am able to launch headless Chrome in AWS Lambda We need to set the following option while launching headless chrome in AWS Lambda.
ChromeOptions options = new ChromeOptions();
options.addArguments("headless");
options.addArguments("window-size=1366,768");
options.addArguments("--single-process");
options.addArguments("--disable-dev-shm-usage");
options.addArguments("--no-sandbox");
options.addArguments("--user-data-dir=/tmp/user-data");
options.addArguments("--data-path=/tmp/data-path");
options.addArguments("--homedir=/tmp");
options.addArguments("--disk-cache-dir=/tmp/cache-dir");
Complete Implementation: https://github.com/pbgarodi/Automation-testing-using-aws-lambda
Upvotes: 1