🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← All topics

Quiz: Selenium Setup: questions with answers

10 questions, each with the answer and a short explanation.

Take the timed quiz + get a certificate →
  1. Q1. Since Selenium 4.6, how do you usually get the browser driver?
  2. Q2. What is the difference between driver.close() and driver.quit()?
  3. Q3. Why run browsers in headless mode on a CI server?
  4. Q4. In TestNG's assertEquals(a, b), which argument is the actual value?
  5. Q5. What does findElements return when nothing matches?
  6. Q6. What does driver.get(url) do?
  7. Q7. driver.findElement(By.id("missing")) is called and no element matches. What happens?
  8. Q8. Which component sits between your Java test and the browser?
  9. Q9. Why should every test end by calling driver.quit(), usually in an @AfterMethod?
  10. Q10. Which method gives the address of the page currently open?