Get a HTM extracted data in a variable

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 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
Pauler
Posts: 3
Joined: Sun Oct 30, 2011 8:29 am

Get a HTM extracted data in a variable

Post by Pauler » Sun Oct 30, 2011 8:43 am

Hey guys

I'm a very noob user of iMacro.
I was found this code in the wiki :

Code: Select all

TAG POS=1 TYPE=HTML ATTR=* EXTRACT=HTM
I want to put the html data in a variable to past it after in a form.

How can I do that please.

Thanks
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Re: Get a HTM extracted data in a variable

Post by Tech Support » Sun Oct 30, 2011 10:30 am

This is a very good question!

Solution: Extracted data is automatically stored in the !EXTRACT variable.

So what you can do is this:

Code: Select all

TAG POS=1 TYPE=HTML ATTR=* EXTRACT=HTM
SET !VAR1 {{!EXTRACT}}
'If you need more variables
SET !EXTRACT NULL
TAG POS=1 TYPE=A ATTR=somethingelse* EXTRACT=HTM
SET !VAR2 {{!EXTRACT}}
=> now the values are in !VAR1 and !VAR2 and you can use it to fill out forms etc. You can manipulate the values with the EVAL command.
Pauler
Posts: 3
Joined: Sun Oct 30, 2011 8:29 am

Re: Get a HTM extracted data in a variable

Post by Pauler » Sun Oct 30, 2011 11:01 am

Thank you very very much. :)
I will try to use it and try to paste it.

I'll be back if I can't :mrgreen:
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Re: Get a HTM extracted data in a variable

Post by Tech Support » Sun Oct 30, 2011 11:23 am

Here are some ideas on how you can detect that the data is 100% loaded:

http://wiki.imacros.net/Web_Testing#Q:_ ... eb_page.3F
Post Reply