How to fix an "Element not found" error in Selenium IDE?
by thulashi[ Edit ] 2015-01-21 13:13:31
After recorded the script when playing it displays the Error as "Element not found"
Example:
[error] Element link='Sample' not found
Soluation:
Most probably it will be an issue with page delay or page load time issue. We can use the following commands to solve this problem
WaitFor, clickAtAndWait and Click and Wait.
We can use clickAtAndWait command for continous click of more than one link or page.
Source code:
<tr>
<td>selectWindow</td>
<td>null</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@id='alarmContentDisplay']/div[2]/div[11]/h2</td>
<td></td>
</tr>
<tr>
<td>clickAtAndWait</td>
<td>link=sample1</td>
<td></td>
</tr>
<tr>
<td>waitForAlert</td>
<td>link=Sample2</td>
<td></td>
</tr>