TargetQA
Java
Lesson 1 of 2 · 7 min

1.1 WebDriver Setup & Browser Navigation

AI

Lesson Audio Narration

### Selenium 4 Architecture Selenium WebDriver communicates with browsers using the W3C WebDriver standard: ``` Your Java Code -> W3C WebDriver Protocol -> Browser Driver -> Real Browser ``` ### Java WebDriver Template: ```java import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.testng.Assert; import org.testng.annotations.Test; public class FirstTest { @Test public void testNavigation() { WebDriver driver = new ChromeDriver(); driver.manage().window().maximize(); driver.get("https://targetqa.com"); String title = driver.getTitle(); Assert.assertTrue(title.contains("TargetQA")); driver.quit(); } } ```
Your Task

Call `driver.get("https://targetqa.com")` and assert that `driver.getTitle()` contains `"TargetQA"`.

Common doubts
Did you find this lesson helpful?
solution.java
Loading code editor…
Execution Console

Click "Run Code" to test your implementation.