Unable to automate File menu

Asked by Sathyamoorthy

Hi,
Question regarding Sikuli tool.

i want automate Windows notepad File menu. i am able to capture snapshot of main menu like "File". and next click step, i am unable to capture "Open" item snapshot.

i want to automate file menu nevigation like File --> Open
                                                             File --> Save
like that

Please help me to sort out this issue.

Thanks,
V.Sathyamoorthy

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Sathyamoorthy
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

Having the menu open press shift-ctrl-2 to make a screenshot when not having the IDE in foreground (see IDE Preferences).

BTW: to open the file menu of notepad without any image stuff

App.focus("notepad")
wait(1) # wait shortly to get the notepad window to front
type("o", KeyModifier.CTRL) # opens the open dialog
wait(3) # only needed to see it open

Revision history for this message
Sathyamoorthy (sathyamoorthybe) said :
#2

Thanks for the info.
in my scenario.. i have cover so many drop down menus. For example tocreate VM, in VM creation wizard i have to select particular OS based on the user input, so i have to walk through drop down items. Hence i asking this question.

is there any other way to open dropdown menu for selcting Item [For taking snapshot]

Thanks your Help. Much appriciated.

V.Sathyamoorthy

Revision history for this message
RaiMan (raimund-hocke) said :
#3

Sorry for being unclear:

If you want to snapshot some GUI elements, that might not be accessible from the IDE, then you have the snapshot-key:

- have the IDE open and the cursor at the position, that you want the image to be inserted
- go to your app and open what is needed
- press the hotkey (see preferences and above)

You will be able now to snapshot and the image will be inserted into your script.

The example from above was only to recommend: try to use app specific shortcut keys as often as possible instead of searching and clicking images.

Revision history for this message
Sathyamoorthy (sathyamoorthybe) said :
#4

Thanks for the detalied explanation.

yeap. i have still have problem with my Virual macine creation wizard. Colud you please help me to sort it out.

See in Vsphere client application, I want to create New Virtual Machine, when I am runing through wizard , there is option to select Operating system.

i used IDE preference like ctrl-shift-2 capture snapshot to select OS option, but script was not selecting that one. Please guide me to select OS based on input value fro the drop down menu

Thanks, Much appriciated your effort

Revision history for this message
Sathyamoorthy (sathyamoorthybe) said :
#5

Hi,

Thanks For your help. I am able to do it.

Thank you very much