How to extract some html elemet from dynamic page

Discussions and Tech Support specific to the iMacros Firefox add-on.
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
Kamnerobot
Posts: 2
Joined: Wed Oct 29, 2014 7:16 pm

How to extract some html elemet from dynamic page

Post by Kamnerobot » Thu Oct 30, 2014 9:19 am

Hi, people. I am starting to use iMacros and meet some difficults:
I use php script to generate some text-string
PHP script starts by "GOTO" from iMacros and generate html-page with this string(<span id="mysting">jhlkjlk89d89d8d89d</span>), and i need to EXTRACT it.
The problem is that the script generates page each time in a different time from 4 to 50 seconds. And i can't use delay and wait while html-page is loaded, because, for some reasons, i need to extract a string as soon as it appeares on the page.

How can i use EVAL or another way to check the appearence of element on the page?

Thank You
Snayler
Posts: 12
Joined: Wed Mar 26, 2014 2:12 pm

Re: How to extract some html elemet from dynamic page

Post by Snayler » Thu Oct 30, 2014 1:36 pm

You can use:

Code: Select all

SET !TIMEOUT_STEP 50
This way, it will wait upto 50 seconds for the element before giving up looking for it. This method will "tag" the element as soon as it appears on the page.
Kamnerobot
Posts: 2
Joined: Wed Oct 29, 2014 7:16 pm

Re: How to extract some html elemet from dynamic page

Post by Kamnerobot » Sun Nov 02, 2014 9:21 pm

Thank You, it works!
chivracq
Posts: 9377
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: How to extract some html elemet from dynamic page

Post by chivracq » Mon Nov 03, 2014 3:08 am

Kamnerobot wrote:Thank You, it works!
Good, lucky for you, as I don't answer Threads with "CIM" and careless Spelling Mistakes in the Thread Title that make it difficult/impossible to find later on for other Users with the same Pb...
:idea: Remember that for the next time and you can still edit your first Post... :idea:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Post Reply