Selecting items by name from a drop down list

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
JEH
Posts: 2
Joined: Tue Jan 08, 2008 4:27 pm
Location: England

Selecting items by name from a drop down list

Post by JEH » Tue Jan 08, 2008 5:05 pm

I have recorded a macro that selects a value from a drop down list. This shows up in the macro as follows

TAG POS=1 TYPE=SELECT FORM=NAME:groups ATTR=NAME:selection CONTENT=5

My problem is that I will only know the TEXT to be selected not its position in the drop down list, as the list constantly changes. What do I need to substitute after CONTENT= to select the attribute that matches the TEXT I supply as a variable.

Any help would be appreciated.
:?
mknoll1
Posts: 174
Joined: Fri Dec 23, 2005 4:14 pm

Post by mknoll1 » Tue Jan 08, 2008 9:55 pm

TAG POS=1 TYPE=SELECT FORM=NAME:groups ATTR=NAME:selection CONTENT=$Text Value
my2testing
Posts: 21
Joined: Tue Oct 30, 2007 6:57 am
Contact:

Post by my2testing » Wed Jan 09, 2008 12:35 am

You should read about TAG.
Special TAG Commands for Drop Down Menus.=>http://wiki.imacros.net/TAG
JEH
Posts: 2
Joined: Tue Jan 08, 2008 4:27 pm
Location: England

Post by JEH » Wed Jan 09, 2008 11:04 am

Many thanks to both of you for taking the time to reply.

I have read up on the TAG command and my macro is running like a dream.

:D
Post Reply