0

I have a test that clicks on a preview link > opens up a window and I do some sort of test in that newly open window. I then close that window and click on the preview link again and repeat.

Let's say the test follows this pattern for 100 times. Once it hits say 10th times, clicking on the preview link to open the new window doesn't seem to do anything. I don't see a new window opening, and the code seems to still be running. It doesn't break, no exceptions are thrown, etc When I stop the code execution, it seem to have moved on past the line of code that clicks on the preview link... This happens in firefox and chrome

Can someone explain what may be happening?

1

It'll be difficult without the code you're using. Other helpful items would be if there's a browser that the test always works on, and what version of Selenium you're using.

That said, are you testing for your WebElement being visible and enabled as well as not null before you click? If it's in a clickable state (for example, visible, but disabled), WebDriver will click on it without throwing an exception, and nothing else would happen.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.