← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #261614]: Clicking on submenu item changes menu

 

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

Eugene Maslov proposed the following answer:
To prevent menu disappearing, move the mouse right, then down.
The function below can help.

def clickOrtho(img):
    start=Env.getMouseLocation()
    end=find(img).getCenter()
    mouseMove(Location(end.x,start.y))    
    mouseMove(Location(end.x,end.y))
    click(end)
    return end

#usage: e.g. menu View-Zoom-Reset of Firefox

click("menu_view.png")
click("menu_zoom.png")
clickOrtho("menu_reset.png")

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