package com.blackboard.testing.common;

import com.blackboard.testing.driver.LambdaWebDriverThreadLocalContainer;
import com.blackboard.testing.testcontext.EnvironmentDetector;
import com.codeborne.selenide.Configuration;
import com.codeborne.selenide.WebDriverRunner;
import com.gargoylesoftware.htmlunit.javascript.configuration.BrowserName;
import org.junit.BeforeClass;

public abstract class LambdaBaseTest {

    @BeforeClass
    public static void baseTestBeforeClass() {
        Configuration.browser = BrowserName.CHROME.toString();
        Configuration.reopenBrowserOnFail = false;

        if (EnvironmentDetector.inLambda()) {
            Configuration.reportsFolder = "/tmp/selenidereports";
            WebDriverRunner.webdriverContainer = new LambdaWebDriverThreadLocalContainer();
        }
    }
}

package com.blackboard.testing.common;

import com.blackboard.testing.driver.LambdaWebDriverThreadLocalContainer;
import com.blackboard.testing.lambda.LambdaTestHandler;
import com.blackboard.testing.testcontext.EnvironmentDetector;
import com.codeborne.selenide.Configuration;
import com.codeborne.selenide.Selenide;
import com.codeborne.selenide.WebDriverRunner;
import org.junit.BeforeClass;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.TakesScreenshot;

public abstract class LambdaBaseTest {

    @BeforeClass
    public static void baseTestBeforeClass() {
        Configuration.browser = "chrome";
        Configuration.reopenBrowserOnFail = false;

        if (EnvironmentDetector.inLambda()) {
            WebDriverRunner.webdriverContainer = new LambdaWebDriverThreadLocalContainer();
        }
    }

    protected void screenshot(String description) {
        if (EnvironmentDetector.inLambda()) {
            LambdaTestHandler.addAttachment(description + ".png",
                    ((TakesScreenshot) WebDriverRunner.getWebDriver())
                            .getScreenshotAs(OutputType.BYTES));
        } else {
            Selenide.screenshot(description);
        }
    }
}

Add screenshot capability to base test
Add screenshot capability to base test
