Complete the code to open a Chrome browser using Selenium WebDriver.
WebDriver driver = new [1]();The ChromeDriver class is used to launch the Chrome browser in Selenium.
Complete the code to navigate to the URL 'https://example.com'.
driver.[1]("https://example.com");
The get method loads a new web page in the current browser window.
Fix the error in the code to find an element by its ID 'submitBtn'.
WebElement button = driver.findElement(By.[1]("submitBtn"));
The By.id locator finds elements by their ID attribute.
Fill both blanks to click a button with ID 'loginBtn' and then close the browser.
driver.findElement(By.[1]("loginBtn")).[2]();
First, find the element by id, then perform a click action on it.
Fill the blanks to assert the page title is 'Welcome Page' using JUnit.
String title = driver.getTitle(); [1]("[2]", title);
Use assertEquals to compare the expected title 'Welcome Page' with the actual title.
