Click 1st item in the Menu drop down

Asked by Varun Palani on 2017-10-10

Hi All,

I am working on application where I need to click on "Selection" menu and click on "Employee" submenu.

Main = Find("image.png")
click("image.png")
employee = match(menu.getX(), menu.getY()+10,0,0,1)
click(employee)

It did not work. I know I am doing basics wrong. Can you please help me.

Question information

Language:
English Edit question
Status:
Solved
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
Varun Palani
Solved:
2017-10-11
Last query:
2017-10-11
Last reply:
Varun Palani (varun52mit) said : #1

It worked just did some analysis.. used

Main = Find("image.png")
click("image.png")
employee = menu.below(20)
click(employee)

TestMechanic (ndinev) said : #2

click("image.png")
type(Key.DOWN)
type(Key.ENTER)

or even better if you have shortcut for the main menu - for example File menu in the notepad

type("f", KeyModifier.ALT)
type(Key.DOWN)
type(Key.ENTER)