Selenium WebDriver Commands
1 Questions
1 Views

Selenium WebDriver Commands

Created by
@FasterCarnelian9681

Questions and Answers

Given the following HTML code snippet, which of the following Selenium WebDriver commands can be used to locate the search input box?

  • driver.findElement(By.id("twotabsearchtextbox")); (correct)
  • driver.findElement(By.xpath("//input[@id='twotabsearchtextbox']")); (correct)
  • driver.findElement(By.className("nav-input"));
  • driver.findElement(By.cssSelector("input[aria-label='Search Amazon.in']"));
  • Use Quizgecko on...
    Browser
    Browser