0

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.

asked Nov 19, 2016 at 1:36

2 Answers 2

1

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.

answered Nov 19, 2016 at 3:55
1
  • Sorry, I may have been unclear. I have a page that has loaded but the animation on the page disappears too quickly. As such, I want to stop the page from having any other animations or javascript after an initial load since something on the front end breaks my stuff and I want to make sure nothing else occurs. Commented Nov 20, 2016 at 5:40
0

Selenium CANNOT stop javascript animations or any other actions going on in the page. Exactly like user cannot do any of those things. Why you expected it?

Solution is to change the javascript.

answered Dec 1, 2016 at 0:27

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.