Problem with Drop-down box detection.

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
Korax
Posts: 5
Joined: Wed Jun 13, 2007 7:48 pm

Problem with Drop-down box detection.

Post by Korax » Wed Jun 13, 2007 8:15 pm

Hello,

I have a long form to fill, which includes text fields, Text areas, and drop down menus.

I'm able to properly play and record events on the text fields and areas, since they all have unique names. The drop downs however, do not have a name... and iMacros is unable to differentiate among them.

Below is a snippet of the source code for a portion of the web page which has 3 text areas and 3 drop-down menus. Note that the text areas have a name but the drop-downs do not. I have included a screenshot of the actual portion website which runs the code. Unfortunately I cannot provide the actual URL since it is password-protected.

How can I make iMacros properly recognize the drop downs? Note that the only thing which differentiates one from another is a single digit on their "onchange" lines.

Thank you.


========================================================================================

<div style="padding: 20px 15px 0px;">
<div style="border: 1px solid silver;">

<div style="float: right; padding-top: 3px; padding-right: 5px;">
Confidence level:
<select onchange='updateXml("ctl00_contentMain_inputHiddenTasXml","/TechAnalysis/AnalysisDetail/row[AttributeID=\"14\"]/ConfidenceID",this)'>
<option value="" selected="selected"></option>

<option value="1">Don't know</option><option value="2">Low</option><option value="3">Medium</option><option value="4">High</option>
</select>
</div>

<div style="border-bottom: 1px solid silver; padding: 5px 5px 5px 6px; background-color: rgb(240, 240, 240);">
<div style="float: left;">Claim Technical Scope</div>

<div style="clear: left;"></div>

</div>
<div style="padding: 5px;">

<div style="float: left; width: 67%; clear: left;">
<textarea name="ctl00$contentMain$repeaterTechAnalysis$ctl00$repeaterAttributes$ctl14$ctl01" rows="5" cols="20" onchange='updateXml("ctl00_contentMain_inputHiddenTasXml","/TechAnalysis/AnalysisDetail/row[AttributeID=\"14\"]/Text",this)' style="width: 99%;"></textarea>
</div>



<div style="clear: left;"></div>
</div>
</div>

</div>

<div style="padding: 20px 15px 0px;">
<div style="border: 1px solid silver;">

<div style="float: right; padding-top: 3px; padding-right: 5px;">
Confidence level:
<select onchange='updateXml("ctl00_contentMain_inputHiddenTasXml","/TechAnalysis/AnalysisDetail/row[AttributeID=\"15\"]/ConfidenceID",this)'>
<option value="" selected="selected"></option>
<option value="1">Don't know</option><option value="2">Low</option><option value="3">Medium</option><option value="4">High</option>

</select>
</div>

<div style="border-bottom: 1px solid silver; padding: 5px 5px 5px 6px; background-color: rgb(240, 240, 240);">
<div style="float: left;">Technology Keywords</div>

<div style="clear: left;"></div>
</div>
<div style="padding: 5px;">

<div style="float: left; width: 67%; clear: left;">

<textarea name="ctl00$contentMain$repeaterTechAnalysis$ctl00$repeaterAttributes$ctl15$ctl01" rows="5" cols="20" onchange='updateXml("ctl00_contentMain_inputHiddenTasXml","/TechAnalysis/AnalysisDetail/row[AttributeID=\"15\"]/Text",this)' style="width: 99%;"></textarea>
</div>



<div style="clear: left;"></div>
</div>
</div>
</div>

<div style="padding: 20px 15px 0px;">
<div style="border: 1px solid silver;">


<div style="float: right; padding-top: 3px; padding-right: 5px;">
Confidence level:
<select onchange='updateXml("ctl00_contentMain_inputHiddenTasXml","/TechAnalysis/AnalysisDetail/row[AttributeID=\"16\"]/ConfidenceID",this)'>
<option value="" selected="selected"></option>
<option value="1">Don't know</option><option value="2">Low</option><option value="3">Medium</option><option value="4">High</option>
</select>
</div>


<div style="border-bottom: 1px solid silver; padding: 5px 5px 5px 6px; background-color: rgb(240, 240, 240);">
<div style="float: left;">Licensing Candidates</div>

<div style="clear: left;"></div>
</div>
<div style="padding: 5px;">

<div style="float: left; width: 67%; clear: left;">
<textarea name="ctl00$contentMain$repeaterTechAnalysis$ctl00$repeaterAttributes$ctl16$ctl01" rows="5" cols="20" onchange='updateXml("ctl00_contentMain_inputHiddenTasXml","/TechAnalysis/AnalysisDetail/row[AttributeID=\"16\"]/Text",this)' style="width: 99%;"></textarea>
</div>




<div style="clear: left;"></div>
</div>
</div>
</div>

========================================================================================

Image
User avatar
Tech Support
Posts: 4947
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Post by Tech Support » Wed Jun 20, 2007 4:57 pm

Thanks for the detailed post! That is very helpful.

I assume (only) the first box is filled correctly?

To solve your problem, you can either use the Relative Tag command or simply modifiy the POS attribute of the TAG command.

So after recording change

TAG POS=1 ...

to
TAG POS=1 ...
TAG POS=2 ...
TAG POS=3 ...
for all three boxes.

Please see http://wiki.imacros.net/TAG for more details.
Korax
Posts: 5
Joined: Wed Jun 13, 2007 7:48 pm

Post by Korax » Thu Jun 21, 2007 12:44 pm

Thanks for the reply.

Only the text areas are filled. None of the drop downs are filled, not even the first one.

Here is the portion of the script which fills in the text areas, and is supposed to fill in the drop downs:

'Claim Technical Scope (text area)
TAG POS=1 TYPE=TEXTAREA FORM=NAME:aspnetForm ATTR=NAME:ctl00$contentMain$repeaterTechAnalysis$ctl00$repeaterAttributes$ctl14$ctl01 CONTENT={{!COL1}}
'Confidence Level (select)
TAG POS=1 TYPE=SELECT FORM=NAME:aspnetForm ATTR=NAME: CONTENT={{!COL2}}
'Technology Keywords (text area)
TAG POS=1 TYPE=TEXTAREA FORM=NAME:aspnetForm ATTR=NAME:ctl00$contentMain$repeaterTechAnalysis$ctl00$repeaterAttributes$ctl15$ctl01 CONTENT={{!COL3}}
'Confidence Level (select)
TAG POS=1 TYPE=SELECT FORM=NAME:aspnetForm ATTR=NAME: CONTENT={{!COL4}}
'Licensing Candidates (text area)
TAG POS=1 TYPE=TEXTAREA FORM=NAME:aspnetForm ATTR=NAME:ctl00$contentMain$repeaterTechAnalysis$ctl00$repeaterAttributes$ctl16$ctl01 CONTENT={{!COL5}}
'Confidence Level (select)
TAG POS=1 TYPE=SELECT FORM=NAME:aspnetForm ATTR=NAME: CONTENT={{!COL6}}

Also, two more questions:
1. While my script executes, sometimes the flashing light turns red... but it still gets to the end. What does this mean?
2. Is there a limit to the number of columns that can be read from CSV file?

Thanks!
Post Reply