Closed craigfowler closed 7 years ago
I think the solution might be to ignore the 'stale element exception' when performing wait operations. Then, if we get one, ensure that we fetch the element again upon the next try.
There's no way to know if we are on the same web page between those steps (above).
This was implemented via a "wait for page to load" task.
This is really not just limited to testing visibility but that's where it comes up most frequently. It's particularly prevalent when waiting for a page to reload.
If I perform the following sequence of actions:
If between those steps, the page were to reload, the second step would now raise an exception. This would be because the element no longer exists.