How to close windows in Squish IDE (Python) to automate URL checks

571 views Asked by At

I want to use Squish to automate a series of tests that involves visiting many URLs in separate windows.

Is there an easy way to close the current window?

I have a simple loop setup as follows:

for url in testlist:
    loadUrl(url)
    #Do some tests

I just need one more line to close the window, before the loop does another iteration and repeats the tests on the next url.

1

There are 1 answers

0
Ryan Boykin On

I don't have the right version of Squish to test this solution, so my code may not work I am more suggesting an idea.

Can you perhaps use the Squish Web API function evalJS(); to call the JS self.close() function.

It may be something like:

evalJS("self.close();")