Complete the code to locate a web element by its ID using @FindBy.
@FindBy([1] = "submitBtn") private WebElement submitButton;
The @FindBy annotation uses the id attribute to locate the element with ID "submitBtn".
Complete the code to locate a web element by its CSS class using @FindBy.
@FindBy([1] = "login-input") private WebElement usernameField;
The @FindBy annotation uses className to locate the element with the CSS class "login-input".
Fix the error in the @FindBy annotation to locate an element by its name attribute.
@FindBy([1] = "password") private WebElement passwordField;
The correct attribute to locate an element by its name is name. Using id or others will not find the element if it only has a name attribute.
Fill both blanks to locate a button element by its tag name and CSS class using @FindBy.
@FindBy([1] = "button", [2] = "btn-primary") private WebElement primaryButton;
The @FindBy annotation can combine tagName and className to locate the button element with class "btn-primary".
Fill all three blanks to create a @FindBy annotation that locates an input element by tag name, name attribute, and CSS class.
@FindBy([1] = "input", [2] = "email", [3] = "form-control") private WebElement emailInput;
This annotation locates the input element by its tag name input, its name attribute email, and its CSS class form-control.