Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, windows and java based applications. Get your 30 day free trial.

Discuss your Sahi Pro usage patterns, best practices, problems and solutions. Help others solve their problems and seek help from the community when needed. If you need specific support on your application, please email support @ sahipro.com

Loops using assert as the controller / eval.top.close()

mwebbmwebb Members
edited July 2014 in Sahi - Open Source
I have a seriously complicated test going on here. Part of the test uses
while(_condition(_assertNotExists(_cell($emailTypes[$i])) != false) )

which I use to wait a varying amount of time for something to appear, which changes based on the number of times I do something. This works wonderfully, save for one small issue. It logs a failure at the end of the loop, when the object I'm waiting for finally appears. Is there a way to fix this, or override that failure log?

Secondly, part of this test opens another tab that I need to assert something within, and then close it. this part also works just fine, except for the fact that after using
_popup("Title of Popup).eval("top.close()");

To close the window, Sahi stops logging everything. It continues to perform the functions in the test, but the actual logs just read

[auto]

How can I fix this?

Answers

Sign In or Register to comment.