I have recorded the log-in into some page with FireFox Plugin Selenium IDE
. The recorded result looks like this:
..
....
</thead><tbody>
<tr>
<td>open</td>
<td>/libs/cq/core/content/welcome.html</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>/libs/cq/core/content/login.html?resource=%2Fcontent%2Fvrbp%2Fde%2Fpage%2home.html&$$login$$=%24%24login%24%24</td>
<td></td>
</tr>
<tr>
<td>storeElementPresent</td>
<td>id=input-submit</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>id=input-submit</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>id=searchbox__form-text</td>
<td></td>
</tr>
...
.....
I have saved this Test-case and started it with Selenium IDE. It works fine. It opens the welcome page and then opens the login page and then do the log in.
The problem is now in the case if I am already loged in the page. the Test process hangs on the line ClickAndWait
. It does not find the login fields, because I am already loged in.
My Question is: How to tell that it should ignore this step, if I am already loged in?