13867/how-do-i-get-current-url-in-selenium-webdriver-using-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.
Use current_url element. Example:
print browser.current_url
Hello @Raj,
You can get the URL in the same way as you would get it if is not headless:
print (browser.current_url)
OR
print(driver.current_url)
Hope it help!
Thank You!!
If you want to get the html ...READ MORE
You can use this String base = ...READ MORE
Try the following: driver.find_elements_by_xpath("//*[contains(text(), 'My Button')]") I hope this ...READ MORE
There are a couple of errors there. ...READ MORE
The better way to handle this element ...READ MORE
enable trusted connection in internet explorer by ...READ MORE
To Allow or Block the notification, access using Selenium and you have to ...READ MORE
xpath are two types. 1) Absolute XPath: /html/b ...READ MORE
Check the below code: Here is the working ...READ MORE
I found that my MIME file type ...READ MORE
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.