Reputation: 41
Followed steps mentioned in squish website,
https://kb.froglogic.com/squish/howto/semi-automatic-testing/
Downloaded and copied easygui.py and choicebox.py in test suite folder.
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.
Upvotes: 0
Views: 85
Reputation: 732
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.
Upvotes: 0