0

Followed steps mentioned in squish website,

https://kb.froglogic.com/squish/howto/semi-automatic-testing/

  1. Downloaded and copied easygui.py and choicebox.py in test suite folder.

  2. Copied below script in test.py,

    import subprocess

    def main(): c = choicebox("Message", "Title", ["Choice 1", "Choice 2"]) test.log(c)

    def choicebox(msg, title, choices_array): cmd = ["python"] cmd.append(squishinfo.testCase + "/../choicebox.py") cmd.append(msg) cmd.append(title) for c in choices_array: cmd.append(c)

    s = os_capture(cmd)
    
    # Return first line, on all platforms
    s = s.replace("\r\n", "\n")
    s = s.replace("\r", "\n")
    return s.split("\n")[0]
    

    def os_capture(cmd): return subprocess.Popen( args=cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT).communicate()[0]

Above code took from squish website to create the GUI display/window.

When i run above script file,

My squish control bar is keep running,

No window/GUI window is displayed.There is no output.

1 Answer 1

0

If possible, use the testInteraction functions provided by Squish instead.

PS: The knowledge base article that you mentioned had some issues that should be fixed by now. However, the article itself is deprecated now, in favor of the testInteraction functions.

Sign up to request clarification or add additional context in comments.

2 Comments

#frog.ca how to take variable user input from one.py(testcase) and import/assign same value in second.py(this file is under testsuite folder).
@SrinivasR,each test case gets executed by a new squishrunner process, therefore Squish does not support this. You have to implement something yourself, like write it into a file in one test case, then read it from the file in another test case. Keep in mind that test case should ideally not depend on each other, so this in this regard this is not a good idea.

Your Answer

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.