Dynamic web table

There is dynamic table on page which is based on ajax it gets refreshes on its own after 5-10 sec (max time). This table contains 1000 + rows

Now problem statement is
We need to delete a record from this table using delete button for a given table name which we know at start of test case but table refreshes after every 10 seconds so we get StaleElementReference exceptions. How to deal with these type of elements. Do we have any javascript execution solution to this, something which is very quick to perform before exception.

HTML structure is something like this
<div>
<tr>
<td>
<span>
<span> checkbox type element1</span>
<span> table name1 </span>
<span>
</a> button to delete</a>
</a> button to edit</a>
</span>
</span>
</td>

<td>
<span>
<span> checkbox type element2</span>
<span> table name 2</span>
<span>
</a> button to delete</a>
</a> button to edit</a>
</span>
</span>
</td>
.
.
.
.
<td>
<span>
<span> checkbox type element 1000</span>
<span> table name 1000</span>
<span>
</a> button to delete</a>
</a> button to edit</a>
</span>
</span>
</td>
</tr>
</div>

amitjain Supporter Asked on March 30, 2015 in Selenium WebDriver.
Add Comment
1 Answer(s)

Find the element just before  the action on the element. Is it something that you are not doing already?

Can we get a url to look at the problem?

Virender

Virender Singh Professor Answered on March 30, 2015.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.