← Back to team overview

sikuli-driver team mailing list archive

[Question #205306]: How to use Java code and Sikuli to click menu items

 

New question #205306 on Sikuli:
https://answers.launchpad.net/sikuli/+question/205306

I have an application where I need to be able to log out and the only way to do so is to click on the Log out option in the drop down menu however I am having a lot of problems.

I have captured the screenshots using the Sikuli IDE (and the shortcuts) and when I run my code from the IDE it works perfectly fine. (The code clicks on Menu and then Log out)

However when I try to run the code from Java it appears that it selects Menu and then when it tries to click Log out, the menu disappears.

My guess is that for some reason Java is putting the focus on the mouse before it moves to the Log out button and when the focus goes to the mouse the menu disappears as it does when you click elsewhere.

I have also tried making Sikuli press the down button several times to get to log out but the same thing happens when it tries: the menu disappears.`

I'm pretty sure that image matching is not the problem because the mouse does not move from the Menu button. It just flashes for a second as if it did click something. However, I know that it does NOT click the menu button again because on this particular application, when you click the menu button multiple times, the menu still stays open. Also, if I'm using the exact same images and everything as I am when I run it from the Sikuli IDE and the IDE works, you would think that it would work exactly the same way from the Java code

Please help! There is no other way to log out of this application that I can find.

I am running Sikuli X - 1.0rc3 (r905) and Java(TM) 6 Update 33 with Java(TM) SE Development Kit 6 Update 33

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.