How to select from a dropdown box

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
Posts: 4
Joined: Thu Mar 12, 2009 4:03 pm

How to select from a dropdown box

Post by nigelevans » Tue Mar 17, 2009 12:41 pm

This is what I am trying to do.

I have a number of different articles, written by different authors about different subjects. I wish to submit these articles to 100 article directories. I have registered for an account at each article directory and created a macro to sign in and out of each directory and a macro to enter the date into the appropriate fields. I have a CSV file for each article which is split into columns and each column represents a field - eg author name, article keywords, article body, author resource box and article category. It is this last field that is causing me problems as it is a dropdown box.

When I create the macro by recording the motions through the imacro firefox addon I have to specify just one category in the drop down box, say "internet". This is all fine if all the articles that i send to all these directories are "internet" related article, but they arent. How do I script the imacro so that I can specify an article category in one of my columns in a csv file and the macro will automatically open the correct category at each directory site and post the article in the right category, eg "gardening" or whatever it might be.

Thanks for your input!
Posts: 174
Joined: Fri Dec 23, 2005 4:14 pm

Re: How to select from a dropdown box

Post by mknoll1 » Wed Mar 18, 2009 8:51 pm

So you wrote a script and it looks something like this right?

Code: Select all

VERSION BUILD=6221002     
TAB T=1     
URL GOTO=     
THe last part of the last line CONTENT=8 is what governs the option chosen in the drop down box. You can interact with the box by numerical position (3,6, 13, etc) or you can interact with the box by value.

To select by value you can edit the line to say CONTENT=$*firefox* I recommend liberal use of wildcards because there is often hidden white space you may not see.

In my opinion you should use value at all times and only rarely if ever use position. Dropdown boxes are always adding and removing values. When you use positional clicks and the values change you are choosing the wrong option and your script tanks. However, if you are using value the command shoudl still succeed as long as your option has not been removed.
Post Reply