How to Choose a State From a From Dropdown List

I like to set up macros which will fill in forms like the attached: name, address etc.

But I'm not sure what to do when form has a drop-down selection required, like the State. Is there a way to handle this in a macro? Currently, I just stop the macro there and make a manual selection, which of course interrupts the flow. Let me know.

Thanks, Tim

Is this a web page in a browser, or an app? The correct answer may depend on this.

web page is in a browser (Safari)

Ok, a web browser's boxes, buttons and fields are accessible to KM macros through Javascript. I'm not skilled with that so someone else will have to advise you. There are lots of people on this forum who are skilled with it.

Is the answer to the drop down box always the same, or do you need the user to specify what goes in the field?

Appreciate your attention to this. In this case the answer for me would be the same (New York, sometimes NY).

Some browsers (and some apps, including KM's Prompt for User Input action) allow you to pick items in a drop-down list using a keyboard key. In your case, try pressing "N" for "New York" and see if it moves you to NY. Then try pressing ENTER or SPACE to see if that changes the selection. If so, you may not need to get someone who knows JavaScript to tell you how to do it with that tool. If you can figure it out with this idea, go for it. If you can't, then you'll have to wait for advice from someone who knows JS. Give it a try.

Hey Tim,

I'd use a Execute a JavaScript in Front Browser action to set the action.

You'd need to enable the developer tools in Safari, and inspect the pop-up menu. Then grab the JavaScript selector reference.

Once you have that you should be able to set its value.

This is a bit tricky until you get used to the dev-tools and JavaScript, but it's usually doable.


Thanks, I understand this and will give it a try.

Thanks Chris, sounds good but right now beyond my capabilities. Will see if I can figure this out. Tim