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?