I\'m attempting to get the URL of the currently open page. I am using Selenium WebDriver and Java.
I am accessing the current URL via:
WebDriver dri
Put sleep. It will work. I have tried. The reason is that the page wasn't loaded yet. Check this question to know how to wait for load - Wait for page load in Selenium