Protected: LambdaTest Running Your First Test on LambdaTest Estimated reading: 1 minute 24 views Now that LambdaTest is set up, it’s time to run our first automated test. This guide will walk you through writing and executing a Selenium-based test on LambdaTest’s cloud infrastructure, ensuring proper test execution with logging and debugging.Writing Your First LambdaTest Automation ScriptTo run a test on LambdaTest, configure your WebDriver and execute a simple automated test case.LambdaTest Exampleimport org.openqa.selenium.WebDriver; import org.openqa.selenium.remote.DesiredCapabilities; import org.openqa.selenium.remote.RemoteWebDriver; import java.net.URL; public class FirstLambdaTest { public static void main(String[] args) throws Exception { String username = "YOUR_USERNAME"; String accessKey = "YOUR_ACCESS_KEY"; String gridURL = "https://" + username + ":" + accessKey + "@hub.lambdatest.com/wd/hub"; DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability("browserName", "Chrome"); capabilities.setCapability("version", "latest"); WebDriver driver = new RemoteWebDriver(new URL(gridURL), capabilities); driver.get("https://www.example.com"); System.out.println("Title: " + driver.getTitle()); driver.quit(); } }After executing the script, review the results in the LambdaTest Automation Dashboard, where logs, screenshots, and session details provide insights into test execution.ConclusionWith your first test running successfully, you’re ready to explore advanced configurations. Next, we’ll dive into Understanding LambdaTest Capabilities and Configurations. Protected: LambdaTest - Previous Setting Up LambdaTest for Automated Testing Next - Protected: LambdaTest Understanding LambdaTest Capabilities and Configurations