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

0 votes

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.

Aug 8, 2018 in Selenium by GandalfDwhite
• 1,320 points
5,657 views

1 answer to this question.

0 votes

Use current_url element. Example:

print browser.current_url
answered Aug 8, 2018 by Meci Matt
• 9,420 points

Related Questions In Selenium

0 votes
2 answers

How to get HTML Source of WebElement in Selenium WebDriver using Python?

You can read innerHTML attribute to get source of ...READ MORE

answered Jun 13, 2018 in Selenium by Samarpit
• 5,130 points
13,879 views
0 votes
1 answer
0 votes
1 answer

How do i change the location where my file gets downloaded in Selenium Webdriver and firefox driver?

There are a couple of errors there. ...READ MORE

answered Apr 12, 2018 in Selenium by nsv999
• 5,090 points
1,507 views
0 votes
1 answer
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,090 points
576 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
898 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
565 views
+9 votes
14 answers

How to automate gmail login process using selenium webdriver in java?

Check the below code: Here is the working ...READ MORE

answered Apr 24, 2018 in Selenium by Vardy
• 2,250 points
59,402 views
0 votes
1 answer