9

I would like to use iMacros for the following task:

  1. on specific page navigate to each link ending with /id=* (how to do a loop ?!)
  2. save the HTML body content of those id's pages to file
  3. on each of those pages there is 'further details button' save the HTML content of popup window (details)

In the meantime, I figured out how to do it and there is a code which works as planed:

VERSION BUILD=7401110 RECORDER=FX
TAB T=1
URL GOTO=http://bla/bla/Documents.xxx
SET !LOOP 1
TAG POS={{!LOOP}} TYPE=A ATTR=HREF:http://bla/bla?id=*
TAG POS=1 TYPE=BODY ATTR=* EXTRACT=HTM
TAG POS=1 TYPE=SPAN ATTR=TXT:View<SP>details
TAG POS=1 TYPE=BODY ATTR=* EXTRACT=HTM
TAB T=2
TAG POS=1 TYPE=BODY ATTR=* EXTRACT=HTM
SAVEAS TYPE=EXTRACT FOLDER=D:\iMacrosExports\ FILE=Extract_{{!NOW:ddmmyy_hhnnss}}.txt
WAIT SECONDS=2

How to include actual value of id=* in the name of saved file?

SET !EXTRACT_TEST_POPUP NO
TAB T=1
URL GOTO=http://bla
SET !LOOP 1
TAG POS={{!LOOP}} TYPE=A ATTR=HREF:http://bla?id=*
SET !VAR1 {{!URLCURRENT}}
TAG POS=1 TYPE=SPAN ATTR=TXT:View<SP>details
WAIT SECONDS=4
TAB T=2
TAG POS=1 TYPE=BODY ATTR=* EXTRACT=HTM
SAVEAS TYPE=EXTRACT FOLDER=D:\iMacrosExport\ FILE=Extract_{{!VAR1}}.txt
WAIT SECONDS=2
Neno
  • 727
  • 3
  • 17
  • 34
  • I edited a question since I made a progress and want to share it ... – Neno Mar 02 '12 at 10:09
  • Hello Brother Can You See Help At This One :/ http://stackoverflow.com/questions/28152560/how-to-select-a-drop-down-of-youtube-by-imacros-auto-increment-value – user3767744 Jan 26 '15 at 21:55

0 Answers0