Selenium Java - Page Object Model
Which of the following is the correct syntax to locate a web element by its ID using
@FindBy annotation?@FindBy annotation?@FindBy annotation requires the attribute name and value as a string. For ID, it is id = "value".id = "submitBtn". @FindBy(name = submitBtn) misses quotes. @FindBy(xpath = submitBtn) uses xpath but without quotes. @FindBy(css = #submitBtn) uses CSS selector but with incorrect syntax (should be css = "#submitBtn").15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions