Search code examples
imacros

imacros extract not retrieving text


I have the following code:

VERSION BUILD=9030808 RECORDER=FX
TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=http://www.demostorage.com/
TAG POS=1 TYPE=A ATTR=TXT:Login<SP>To<SP>Demo
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:/sessions?password=demo_manager&username=demo_manager ATTR=*
TAG POS=1 TYPE=SPAN ATTR=TXT:Reports
TAG POS=1 TYPE=A ATTR=TXT:Management<SP>Summary
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:/reports/management_summary_data ATTR=NAME:commit

' it sometimes takes some time for the report table to display.  therefore wait for the 'Payments' text

TAG POS=1 TYPE=* ATTR=TXT:Payments EXTRACT=HTM
WAIT SECONDS = 2
SAVEAS TYPE=HTM FOLDER=* FILE=mytable_{{!NOW:yymmdd_hhnnss}}.htm

If you run this code and look in the result file, you'll see that the onscreen data does not appear in the saved file, which was supposed to save the entire page. Any idea what silly thing I'm doing wrong?

Thanks!


Solution

  • try extract type extract from your code this end line

    SAVEAS TYPE=EXTRACT FOLDER=* FILE=mytable_{{!NOW:yymmdd_hhnnss}}.htm