Replay Losing Content

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.
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
BillHamaker
Posts: 13
Joined: Fri Jul 12, 2013 4:54 pm

Replay Losing Content

Post by BillHamaker » Mon Sep 14, 2015 8:14 pm

I recording the following script but when I replay it the content of the text box (e.g. 438-362-13-00) disappears as soon as the tag command that fills in the content executes. So on replay the web site displays an error instead of searching for the requested parcel number. Any idea what is happening and what I might be able to do to make it work?


VERSION BUILD=10.3.27.5830
TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=https://arcc.sdcounty.ca.gov/Pages/Asse ... l-Tax.aspx
TAG POS=1 TYPE=SELECT FORM=NAME:aspnetForm ATTR=NAME:ctl00$m$g_d30f33ca_a5a7_4f69_bb21_cd4abc25ea12$ctl00$ddlSearch CONTENT=%1
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:aspnetForm ATTR=NAME:ctl00$m$g_d30f33ca_a5a7_4f69_bb21_cd4abc25ea12$ctl00$txtSearch CONTENT=438-362-13-00
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:aspnetForm ATTR=NAME:ctl00$m$g_d30f33ca_a5a7_4f69_bb21_cd4abc25ea12$ctl00$btnSearch
Tom, Tech Support
Posts: 3529
Joined: Mon May 31, 2010 4:59 pm

Re: Replay Losing Content

Post by Tom, Tech Support » Tue Sep 15, 2015 11:09 am

Hi BillHamaker,

The problem is that making the selection in the drop-down automatically clears the text input field, and in this case iMacros is filling that field before it gets cleared.

You can workaround it by adding a small delay (WAIT SECONDS=1) after the first TAG command that makes the drop-down selection, or alternatively, play the macro back at MEDIUM speed (using SET !REPLAYSPEED MEDIUM in the macro or changing the default speed in the iMacros Options dialog).
Regards,

Tom, iMacros Support
BillHamaker
Posts: 13
Joined: Fri Jul 12, 2013 4:54 pm

Re: Replay Losing Content

Post by BillHamaker » Mon Sep 21, 2015 2:28 pm

Thank Tom,

That fixes that problem but now I have the problem of wanting to download the pdf file that the web site creates. For this particular web site when you click the button for the document it appears to create a temporary folder, downloads the pdf file to the folder and then open up the pdf file with acrobat reader. It isn't a traditional download button that you can right click and select "save target as" and I can't find any way to automate it as a download in iMacros.

What I want want to do is use excel vba to automate the downloading of multiple pdfs to a folder. The excel file will have a list of identifiers that the web site uses. The only think I can think of would be to have vba code that searches all the temporary folders to find the downloaded file by name, moves and renames it the way I want and then kills the acrobat reader process. That might work (I haven't actually tried it) but it seems overly complicated and maybe slow. Any better suggestions?

Below is a script that opens the pdf file for a particular identifier.

VERSION BUILD=10.3.27.5830
TAB T=1
TAB CLOSEALLOTHERS
SET !VAR1 "438-362-13-00"
URL GOTO=https://arcc.sdcounty.ca.gov/Pages/Asse ... l-Tax.aspx
TAG POS=1 TYPE=SELECT FORM=NAME:aspnetForm ATTR=NAME:ctl00$m$g_d30f33ca_a5a7_4f69_bb21_cd4abc25ea12$ctl00$ddlSearch CONTENT=%1
WAIT SECONDS=1
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:aspnetForm ATTR=NAME:ctl00$m$g_d30f33ca_a5a7_4f69_bb21_cd4abc25ea12$ctl00$txtSearch CONTENT={{!VAR1}}
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:aspnetForm ATTR=NAME:ctl00$m$g_d30f33ca_a5a7_4f69_bb21_cd4abc25ea12$ctl00$btnSearch
TAG POS=1 TYPE=IMG FORM=NAME:aspnetForm ATTR=ID:imgdiv{{!VAR1}}
'New tab opened
TAB CLOSEALLOTHERS
Tom, Tech Support
Posts: 3529
Joined: Mon May 31, 2010 4:59 pm

Re: Replay Losing Content

Post by Tom, Tech Support » Wed Sep 23, 2015 10:34 am

BillHamaker wrote:Any better suggestions?
Yes, please check out the following post:

http://forum.imacros.net/viewtopic.php?p=5991
Regards,

Tom, iMacros Support
Post Reply