Pages

Search This Blog

Saturday, June 5, 2010

How to get current page url in selenium

There are some situations where we need to know the url of current page.

selenium IDE

<tr>
<td>storeLocation</td>
<td>url</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>${url}</td>
<td></td>
</tr>



Selenium RC

String url = selenium.getLocation();
System.out.println(url);

8 comments:

  1. Thanks a lot!! i´ve just looking for that!!! regards!

    ReplyDelete
  2. How can i verify an attribut in URL

    ReplyDelete
  3. Exactly what I looking for! Many thanks.

    ReplyDelete
  4. Thanks for sharing great information in your blog. Got to learn new things from your Blog . It was very nice blog to learn about Selenium

    ReplyDelete
  5. Thanks for sharing great information in your blog. Got to learn new things from your Blog . It was very nice blog to learn about Selenium.
    Selenium

    ReplyDelete
  6. Well explained. Got to learn new things from your Blog on Appium.
    Appium training in chennai

    ReplyDelete
  7. It was very nice blog to learn about Selenium.Thanks for sharing new things.selenium training in chennai

    ReplyDelete