Complete the code to click the login button using the correct method.
public void clickLogin() {
loginButton.[1]();
}The click() method is used to simulate a mouse click on a web element like a button.
Complete the code to enter text into the username field.
public void enterUsername(String user) {
usernameField.[1](user);
}The sendKeys() method types the given text into an input field.
Fix the error in the method to clear the search box before typing.
public void search(String query) {
searchBox.[1]();
searchBox.sendKeys(query);
}The clear() method empties the text in an input field before typing new text.
Fill both blanks to define a method that submits a form after entering email.
public void submitEmail(String email) {
emailField.[1](email);
form.[2]();
}First, sendKeys() types the email. Then, submit() sends the form.
Fill all three blanks to create a method that clears, types, and clicks the search button.
public void performSearch(String term) {
searchInput.[1]();
searchInput.[2](term);
searchButton.[3]();
}The method first clears the input, then types the term, and finally clicks the search button.
