I have a flaky selenium spec because a notice disappears after page load because of a separate event that happens from polling the client or some other change. One solution would be immediately on page load to just 'freeze' the state of the page and totally disallow any changes to it via js or otherwise just so I can check that expectation. Is there a way to accomplish this with selenium? Selenium webdriver in Ruby to be specific.
yeah, if my understanding is right, you can check for an element's presence with selenium,
@driver.find_element throws an exception called
NoSuchElementException, you can use it to track this notice.
And a notice will usually be inside of an iframe, you may need to locate this iframe first as well.