← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #674145]: What is the correct way to click on drop-down menus that highlight?

 

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

Paul Chambre gave more information on the question:
With this code:

appWindow.hover(OpenNotebook);
appWindow.click();
Debug.action("Clicked OpenNotebook.");
try {
    appWindow.wait(NotebookOpenDialog, 2);
} catch (FindFailed reclick) {
    Debug.action("Initial Open Notebook click failed.");
    try {
        appWindow.wait(HighlightedOpenNotebook, 1);
        Debug.action("Clicking highlighted menu item");
        appWindow.click(HighlightedOpenNotebook);
    } catch (FindFailed ignored) {
        Debug.action("Re-clicking menu item.");
        appWindow.click(MoreActions);
        // Hover, then click, since hovering will cause the menu item to highlight, and that seemed to cause a race where it wouldn't always click
        appWindow.hover(OpenNotebook);
        appWindow.click();
    }
}

I get this in my log:

[log] CLICK on L(1633,600)@S(0)[0,0 1920x1080] (595 msec)
[log] Clicked OpenNotebook.
[log] Initial Open Notebook click failed.
[log] Clicking highlighted menu item
[log] CLICK on L(1640,600)@S(0)[0,0 1920x1080] (594 msec)

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