🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Web Elements: all 10 questions

Quiz: Web Elements · Question 10 of 10

When should you use JavascriptExecutor, for example to scroll an element into view?

When should you use JavascriptExecutor, for example to scroll an element into view?

  1. A.For every click, because it is faster
  2. B.Only when normal WebDriver actions cannot do the job
  3. C.To avoid writing assertions
  4. D.Never; it is not part of Selenium
Answer & explanation

Correct answer: Only when normal WebDriver actions cannot do the job

JavaScript clicks skip real user behaviour, so they can hide bugs a user would hit.

Can you get the rest right without peeking?

Take the timed Quiz: Web Elements quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →