0

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.

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.