问题
I am trying to get the URL of the current page in Selenium RC for C#. I don't want to get the href attribute of an icon, as I want to use it to compare it with the URL, the icon redirects you too.
回答1:
say you have defined it as
IWebDriver wb;
wb = New FirefoxDriver();
wb.Navigate.GoToUrl("http://gogoel.com");
then to get current url use
String ptr=wb.Url;
来源:https://stackoverflow.com/questions/29569699/how-do-we-get-the-url-of-the-current-page-in-selenium-rc-for-c