user2276896 user2276896 - 1 year ago 502
Python Question

How do I get current URL in Selenium Webdriver 2 Python?

I'm trying to get the current url after a series of navigations in Selenium. I know there's a command called getLocation for ruby, but I can't find the syntax for Python.

Answer Source

Use current_url element. Example:

print browser.current_url
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download