← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #680738]: switchApp()

 

Question #680738 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/680738

RaiMan proposed the following answer:
I againntaested with your environment (Win10-64, Java 8, SikuliX 1.1.3):

Clicker herous window is visible in a Chrome tab, which has in title
"Clickker heroes"

This is my test:
app = switchApp("Clicker Heroes")

if not app.isRunning():
    exit(1)
if app.hasWindow():
    print "window:", app.window()
game = App.focusedWindow()
use(game)
highlight(2)
imgClickPoint = Pattern("imgClickPoint.png").targetOffset(-138,-129)
clickPoint = find(imgClickPoint)
hover(clickPoint)
for i in range(100):
    mouseDown(Button.LEFT)
    mouseUp()

wait(3)
print "************** The End"

BTW: I recommend to try with 1.1.4

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.