How to change the URL on a WebPage using Selenium WebDriver?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to change the URL on a WebPage using Selenium WebDriver?

javelearner
Hello Selenium WebDrivers, 

Can any one please share how I can change the URL on current tab.. ? 

Thanks,
Java lover 

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/b6244fa1-5c6c-498c-bde3-4b4a2a9ef630%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to change the URL on a WebPage using Selenium WebDriver?

Rithika Gupta
Hi 
I believe you want to open a new url on the same page , if so then you can simply do 
seleniumDriver.get("Your new url..");  // this will open the new url page on the same window where you are

if you want to get the current url you can do as:
 String url = seleniumDriver.getCurrentUrl();   // this gives you the current url of the tab that you have focus on


On Sunday, May 6, 2018 at 12:14:53 PM UTC-4, [hidden email] wrote:
Hello Selenium WebDrivers, 

Can any one please share how I can change the URL on current tab.. ? 

Thanks,
Java lover 

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/6d289802-380b-4c33-a480-5cac882eebb1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.