Dealing with animated calendars

Discussions and Tech Support related to automating the iMacros Browser or Internet Explorer from any scripting and programming language, such as VBS (WSH), VBA, VB, Perl, Delphi, C# or C++.

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.

Dealing with animated calendars

by jht05016 on Fri Jun 14, 2013 12:13 pm

I am trying to automate the shipment quotation process at my work. I have a excel sheet that auto exports to a .csv and then I macros will take over. But I have run into one problem. Many of the sites that I am automating, where you select the date is an animated calendar that you must select the date from like the one in this picture.
Image
and here is a picture of the inspect element page open with this calendar open.(if it is too big just right click open pic in new tab)
Image

How would I incorporate this into my code and get it to auto fill my specified date in the .csv?
here is the code that I have already
Code: Select all
VERSION BUILD=6011206 RECORDER=CR

URL GOTO=http://carrierrate.com/


 
(This is where the login info is, I removed it for privacy reasons)


TAB T=1     

TAB CLOSEALLOTHERS 

' Specify input file (if !COL variables are used, IIM automatically assume a CSV format of the input file

'CSV = Comma Separated Values in each line of the file

SET !DATASOURCE TestingTesting.csv

'Start at line 2 to skip the header in the file

SET !LOOP 2

'Increase the current position in the file with each loop

 

SET !DATASOURCE_LINE {{!LOOP}}

' Fill web form

TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:ctl00$ContentPlaceHolder1$txtOriginZip CONTENT={{!COL34}} 

TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:ctl00$ContentPlaceHolder1$txtDestinationZip CONTENT={{!COL8}}

TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:txtLength_1 CONTENT={{!COL20}}

TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:txtWidth_1 CONTENT={{!COL21}}

TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:txtHeight_1 CONTENT={{!COL22}}

TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:txtPieces_1 CONTENT={{!COL38}}

TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:txtWeight_1 CONTENT={{!COL15}}

 

TAG POS=1 TYPE=INPUT:CHECKBOX FORM=ID:aspnetForm ATTR=ID:ctl00_ContentPlaceHolder1_chblgnPickup CONTENT={{!COL39}}

 

'Note * is used to ignore leading and trailing blanks that could be in the input data

'

'The precent (%) symbol is used to select the stateid by VALUE as defined in the website select statement and not by its index.

TAG POS=1 TYPE=SELECT ATTR=NAME:d_state CONTENT=%*{{!COL7}}*

'

'The string ($) symbol is used to select the country by TEXT, not by its index.

'Index would be the position of an entry in the combo box list, e. g. 161 for United States

TAG POS=1 TYPE=SELECT FORM=ID:demo ATTR=NAME:country CONTENT=$*{{!COL9}}*

'

TAG POS=1 TYPE=INPUT:TEXT FORM=ID:demo ATTR=NAME:email CONTENT={{!COL8}}

TAG POS=1 TYPE=BUTTON:submit FORM=ID:demo ATTR=TXT:Submit

 

TAG POS=1 TYPE=A ATTR=TXT:*Back* 

jht05016
 
Posts: 1
Joined: Fri Jun 14, 2013 10:40 am

Re: Dealing with animated calendars

by glytchedup on Thu Apr 07, 2016 6:48 pm

I have this same question. I've been working on it for a few hours, but I can't seem to find a good solution. The code I'm coming across from the recorded macro seems to work like a grid selector instead of any date data. The command below is what selects the April 22nd... I really hope someone has a fix for this!

EVENT TYPE=CLICK SELECTOR="HTML>BODY>TABLE>TBODY>TR:nth-of-type(3)>TD>TABLE>TBODY>TR>TD>TABLE>TBODY>TR>TD>TABLE>TBODY>TR>TD:nth-of-type(2)>TABLE>TBODY>TR>TD>TABLE>TBODY>TR:nth-of-type(2)>TD:nth-of-type(3)>TABLE>TBODY>TR>TD>DIV>TABLE>TBODY>TR>TD>FORM>TABLE>TBODY>TR:nth-of-type(7)>TD>B>A" BUTTON=0
glytchedup
 
Posts: 3
Joined: Thu Apr 07, 2016 6:36 pm


Return to Scripting and Command Line Interface

Who is online

Users browsing this forum: No registered users and 4 guests

-->