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

Quiz: Selenium Setup · Question 10 of 10

Which method gives the address of the page currently open?

Which method gives the address of the page currently open?

  1. A.getTitle()
  2. B.getCurrentUrl()
  3. C.getPageSource()
  4. D.navigate().refresh()
Answer & explanation

Correct answer: getCurrentUrl()

Asserting the URL is a quick way to check that a login redirected correctly.

Can you get the rest right without peeking?

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

Start the quiz →