Click 1st item in the Menu drop down

Asked by Varun Palani

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:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Varun Palani
Solved:
Last query:
Last reply:
Revision history for this message
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)

Revision history for this message
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)