← 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?
- A.getTitle()
- B.getCurrentUrl()
- C.getPageSource()
- 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 →