Problem with "SELECT" (Drop Down List)

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Problem with "SELECT" (Drop Down List)

by Igor on Sun Oct 16, 2005 2:31 am

Say we have a select in the html:
<SELECT>
<OPTION>Some Option</OPTION>
<OPTION>Today News</OPTION>
<OPTION>Some Option</OPTION>
<OPTION>Today Weather</OPTION>
</SELECT>

I want to build a macro that will click on all options that have a word "Today" in it (skipping all other options). The position of these options is dynamic so i tried the following:

TAG POS=1 TYPE=SELECT FORM=NAME:frm1 ATTR=NAME:top_menu CONTENT=$*Today*

this command worked for the first option that had "Today" but if the next line is:

TAG POS=2 TYPE=SELECT FORM=NAME:frm1 ATTR=NAME:top_menu CONTENT=$*Today*

this command does not work. It seems that its searching for the next "SELECT" but not next option inside the "SELECT".

How can i overcome this problem?
Igor
 

by Tech Support on Sun Oct 16, 2005 3:47 pm

The POS attribute describes the position of the SELECT element.

TAG POS=2 TYPE=SELECT FORM=NAME:frm1 ATTR=NAME:top_menu CONTENT=$*Today*

This means the second select element with the name "top_menu" (which does not exist). It does not mean the second entry in the first select element.

Before I can suggest a workaround I need to know:

Do you want to select all "Today.." entries at once (multiple select) or one "today.." after the other (e. g. within a loop)?
User avatar
Tech Support
 
Posts: 5003
Joined: Tue Sep 20, 2005 12:25 pm

by Igor on Sun Oct 16, 2005 11:38 pm

I want to select one "Today" after another, and without a loop - the loop is not needed in this case because i know the maximum number of options with "Today" in it - its 5. So i want 5 commands one after another so that each of them selects next option with "Today".
Igor
 


Return to Data Extraction and Web Screen Scraping

Who is online

Users browsing this forum: Google [Bot] and 3 guests

-->