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

后端 未结 4 1744
旧时难觅i
旧时难觅i 2020-11-29 21:43

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.

4条回答
  •  旧巷少年郎
    2020-11-29 22:21

    According to this documentation (a place full of goodies:)):

    driver.current_url
    

    or, see official documentation: https://seleniumhq.github.io/docs/site/en/webdriver/browser_manipulation/#get-current-url

提交回复
热议问题