How to make SeeShell execute a command based on a user input?


I’m trying to see if I could make SeeShell select an option from a drop-down menu (browser-based) based on a user text input. For example, a dropdown menu of cities. If the user input says “New York”, it selects the New York City from the drop down menu. I understand I have to have a screenshot of all the cities whose filename is the City name (e.g. new_york.png). The idea basically is to execute the command with a screenshot (new_york.png) that matches that tex input (New York). Is that possible? Also, is using if statements allowed?


I’m just guessing how’d I’d try to do this and the only thing I can think of is segment using Set Errorignore TRUE and Set Errorignore FALSE (for each segment) from what Ulrich suggested here Finding/clicking multiple images

Since it’s a macros there’s not interaction that a user can select so I’m assuming the user would select everything before the macros runs. I would Set Errorignore TRUE and have it do what you want if it finds the image, say NewYork.png , if it finds it do this, then Alabama.png etc.

Thing is if you want multiple lines it would have to be with the same .png for each line unless it’s just a single command. If it doesn’t find NewYork.png it then moves on per Ulrich so I’d just list all of the selections together then when you’re done listing all 50 states put Set Errorignore FALSE and proceed with the rest of the commands it has to run after that.

Only idea that came to mind, hopefully you find what you need.