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 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.`
This is my Java code. The Sikuli code has the same two click commands:
@Override
public void logout()
{
click("loggedInIndicator.png");
click("logoutButton.png");
}
Please help! There is no other way to log out that I can find.