Skip to content

Commit

Permalink
Merge branch 'test-segfault-sensitive'
Browse files Browse the repository at this point in the history
  • Loading branch information
LynxAbraxas committed Nov 17, 2018
2 parents 74af495 + 3eea2f4 commit ade2272
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 13 deletions.
18 changes: 13 additions & 5 deletions tests/load-game.sikuli/load-game.py
Expand Up @@ -16,13 +16,21 @@ def main():
click("ctp2Julius-Roma-file.png")
click(Pattern("ctp2OK-btn.png").similar(0.99))
if exists("ctp2ctr-bar.png", 100):
waitVanish("ctp2progress-bar.png", 100) # control bar appears before progressbar vanishes
file = capture(SCREEN.getBounds())
print("Saved screen as "+file)
shutil.move(file, 'ctp2load-game.png')
exit(0)
if waitVanish("ctp2progress-bar.png", 100): # control bar appears before progressbar vanishes
file = capture(SCREEN.getBounds())
if file:
f= Finder(file) # http://doc.sikuli.org/finder.html
f.find("ctp2ctr-bar.png")
if not f.hasNext():
print("Pattern not found in screen shot: " + file)
exit(30)
shutil.move(file, 'ctp2load-game.png')
exit(0)
else:
exit(20)
else:
exit(10)
exit(99)

if __name__ == "__main__":
main()
18 changes: 13 additions & 5 deletions tests/new-game.sikuli/new-game.py
Expand Up @@ -14,13 +14,21 @@ def main():
click("ctp2new-game-btn.png")
click("ctp2launch-btn.png")
if exists("ctp2ctr-bar.png", 100):
waitVanish("ctp2progress-bar.png", 100) # control bar appears before progressbar vanishes
file = capture(SCREEN.getBounds())
print("Saved screen as "+file)
shutil.move(file, 'ctp2new-game.png')
exit(0)
if waitVanish("ctp2progress-bar.png", 100): # control bar appears before progressbar vanishes
file = capture(SCREEN.getBounds())
if file:
f= Finder(file) # http://doc.sikuli.org/finder.html
f.find("ctp2ctr-bar.png")
if not f.hasNext():
print("Pattern not found in screen shot: " + file)
exit(30)
shutil.move(file, 'ctp2new-game.png')
exit(0)
else:
exit(20)
else:
exit(10)
exit(99)

if __name__ == "__main__":
main()
12 changes: 9 additions & 3 deletions tests/start-game.sikuli/start-game.py
Expand Up @@ -12,11 +12,17 @@
def main():
if exists("ctp2start-scr.png", 100):
file = capture(SCREEN.getBounds())
print("Saved screen as "+file)
shutil.move(file, 'ctp2start.png')
exit(0)
if file:
f= Finder(file) # http://doc.sikuli.org/finder.html
f.find("ctp2start-scr.png")
if not f.hasNext():
print("Pattern not found in screen shot: " + file)
exit(30)
shutil.move(file, 'ctp2start.png')
exit(0)
else:
exit(10)
exit(99)

if __name__ == "__main__":
main()

0 comments on commit ade2272

Please sign in to comment.