Skip to content

Instantly share code, notes, and snippets.

@bpteam
Created February 2, 2015 08:49
Show Gist options
  • Save bpteam/d35fab891678b6694069 to your computer and use it in GitHub Desktop.
Save bpteam/d35fab891678b6694069 to your computer and use it in GitHub Desktop.
sikuli sinoptik test
try:
firefox = 'C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe'
url = 'https://sinoptik.ua'
openApp(firefox)
if bool(exists("1422816842381.png",4)) != True:
raise Exception('Can`t run browser')
click("1422818832742.png")
type(url + Key.ENTER)
if bool(exists(Pattern("1422821974735.png").similar(0.95),50)) != True:
raise Exception('Can`t load page ' + url)
click('1422822266010.png')
type('Kie')
if bool(exists(Pattern("search.png").similar(0.90),50)):
popup('WORK')
else:
popup('ERROR!!!')
except Exception, e:
popup(e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment