Selecting from a complex dropdown

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 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.
Post Reply
kenmon99
Posts: 1
Joined: Wed Nov 24, 2010 2:16 pm

Selecting from a complex dropdown

Post by kenmon99 » Tue Oct 29, 2013 9:57 pm

Hi,

Having difficulty selecting from a complex list of dates where some have additional characters attached.

First off:

1. What version of iMacros are you using? V9 Standard
2. What operating system are you using? Win 7 English
3. Which browser(s) are you using? IE 9
4. Do the included demo macros work ok? Yes
5. N/A
6. If recording or replay fails on a specific website: URL is an internal site

In this example, the element I wish to select is "6/30/2011<SP>(A)<SP>GM" from the table below. Recording this selection created this line of code which fails on replay:

TAG POS=2 TYPE=P FORM=NAME:aspnetForm ATTR=TXT:6/30/2011<SP>(A)<SP>GM

Error -1300: Cannot find HTML element of type "P:" with attribute(s) "TXT:6/30/2011 (A) GM".. Line 6: TAG POS=2 TYPE=P FORM=NAME:aspnetForm ATTR=TXT:6/30/2011<SP>(A)<SP>GM

Here is the HTML from the site (there are 93 entries and so I have truncated in the interest of space):

</select>
<table id="ctl00_ContentMainArea_dlReportingPeriodSelector" cellspacing="0" border="0" style="border-collapse:collapse;">
<tr>
<td>
<select name="ctl00$ContentMainArea$dlReportingPeriodSelector$ctl00$ctl00" onchange="javascript:setTimeout('__doPostBack(\'ctl00$ContentMainArea$dlReportingPeriodSelector$ctl00$ctl00\',\'\')', 0)" id="PeriodSelectorMain0" class="period-selector fancy" data-index="0">
<option value=""><Please Select></option>
<option value="3273273" data-statement-date="9/30/2013" data-statement="GM" data-instance="0" data-rating-status="">3273273</option>
<option value="3258840" data-statement-date="8/31/2013" data-statement="GM" data-instance="0" data-rating-status="">3258840</option>
<option value="3248717" data-statement-date="7/31/2013" data-statement="GM" data-instance="0" data-rating-status="">3248717</option>
<option value="3234125" data-statement-date="6/30/2013" data-statement="GM" data-instance="0" data-rating-status="(A)">3234125</option>
<option value="3203341" data-statement-date="5/31/2013" data-statement="GM" data-instance="0" data-rating-status="">3203341</option>
<option value="3188431" data-statement-date="4/30/2013" data-statement="GM" data-instance="0" data-rating-status="">3188431</option>
<option value="3176428" data-statement-date="3/31/2013" data-statement="GM" data-instance="0" data-rating-status="">3176428</option>
<option value="3159880" data-statement-date="2/28/2013" data-statement="GM" data-instance="0" data-rating-status="">3159880</option>
<option value="3152620" data-statement-date="1/31/2013" data-statement="GM" data-instance="0" data-rating-status="">3152620</option>
<option value="3084195" data-statement-date="12/31/2012" data-statement="GM" data-instance="0" data-rating-status="">3084195</option>
<option value="3039596" data-statement-date="11/30/2012" data-statement="GM" data-instance="0" data-rating-status="">3039596</option>
<option value="2966737" data-statement-date="10/31/2012" data-statement="GM" data-instance="0" data-rating-status="">2966737</option>
<option value="2926214" data-statement-date="9/30/2012" data-statement="GM" data-instance="0" data-rating-status="">2926214</option>
<option value="2879285" data-statement-date="8/31/2012" data-statement="GM" data-instance="0" data-rating-status="">2879285</option>
<option value="2818624" data-statement-date="7/31/2012" data-statement="GM" data-instance="0" data-rating-status="">2818624</option>
<option value="2770267" data-statement-date="6/30/2012" data-statement="GM" data-instance="0" data-rating-status="(A)">2770267</option>
<option value="2719598" data-statement-date="5/31/2012" data-statement="GM" data-instance="0" data-rating-status="">2719598</option>
<option value="2666459" data-statement-date="4/30/2012" data-statement="GM" data-instance="0" data-rating-status="">2666459</option>
<option value="2612486" data-statement-date="3/31/2012" data-statement="GM" data-instance="0" data-rating-status="">2612486</option>
<option value="2569330" data-statement-date="2/29/2012" data-statement="GM" data-instance="0" data-rating-status="">2569330</option>
<option value="2537669" data-statement-date="1/31/2012" data-statement="GM" data-instance="0" data-rating-status="">2537669</option>
<option value="2474780" data-statement-date="12/31/2011" data-statement="GM" data-instance="0" data-rating-status="">2474780</option>
<option value="2438910" data-statement-date="11/30/2011" data-statement="GM" data-instance="0" data-rating-status="">2438910</option>
<option value="2415941" data-statement-date="10/31/2011" data-statement="GM" data-instance="0" data-rating-status="">2415941</option>
<option value="2403483" data-statement-date="9/30/2011" data-statement="GM" data-instance="0" data-rating-status="">2403483</option>
<option value="2391243" data-statement-date="8/31/2011" data-statement="GM" data-instance="0" data-rating-status="">2391243</option>
<option value="2371365" data-statement-date="7/31/2011" data-statement="GM" data-instance="0" data-rating-status="">2371365</option>
<option value="2368414" data-statement-date="6/30/2011" data-statement="GM" data-instance="0" data-rating-status="(A)">2368414</option>
<option value="2340640" data-statement-date="5/31/2011" data-statement="GM" data-instance="0" data-rating-status="">2340640</option>
<option value="2328830" data-statement-date="4/30/2011" data-statement="GM" data-instance="0" data-rating-status="">2328830</option>
<option value="2312893" data-statement-date="3/31/2011" data-statement="GM" data-instance="0" data-rating-status="">2312893</option>
<option value="2292917" data-statement-date="2/28/2011" data-statement="GM" data-instance="0" data-rating-status="">2292917</option>
<option value="2275724" data-statement-date="1/31/2011" data-statement="GM" data-instance="0" data-rating-status="">2275724</option>
(extra entries removed)

</select>
</td><td></td><td></td><td></td><td></td>
</tr>
</table>


Thanks in advance.

Cheers

Ken
Post Reply