Friday 12 July 2013

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);

No comments:

Post a Comment

Angular JS Protractor Installation process - Tutorial Part 1

                     Protractor, formally known as E2E testing framework, is an open source functional automation framework designed spe...