Using tab Buttons on an HTML page - timeout
Forum rules
iMacros EOL - Attention!
The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.
Thank you again for your business and support.
Sincerely,
The Progress Team
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
iMacros EOL - Attention!
The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.
Thank you again for your business and support.
Sincerely,
The Progress Team
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
Using tab Buttons on an HTML page - timeout
Using tab Buttons on an HTML page
Using the free Chrome attachment.
Windows 7 64 bit
Chrome Version 52.0.2743.116 m
I have a Imacros script that activates a button which sends data to a server, which then sends data back to me. The data submission retrieval part is handled by a php script. Sometime the sever takes too long and the Imacros script times out. How do I get the Imacros script to wait for the info to load before executing the BACK command? I am currently using the WAIT SECONDS command to get this to work but sometimes 1 sec isn't enough and the script times out; it seems that there must be a better way to do this. Here is part of the current script I am using.
VERSION BUILD=8350307 RECORDER=CR
URL GOTO=http://localhost/asin3.htm
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:a2.php ATTR=NAME:Submitbutton
WAIT SECONDS = 1
BACK
TAG POS=2 TYPE=INPUT:SUBMIT FORM=ACTION:a2.php ATTR=NAME:Submitbutton
WAIT SECONDS = 1
BACK
TAG POS=3 TYPE=INPUT:SUBMIT FORM=ACTION:a2.php ATTR=NAME:Submitbutton
WAIT SECONDS = 1
BACK
...
TAG POS=160 TYPE=INPUT:SUBMIT FORM=ACTION:a2.php ATTR=NAME:Submitbutton
WAIT SECONDS = 1
BACK
...
Thanks
Using the free Chrome attachment.
Windows 7 64 bit
Chrome Version 52.0.2743.116 m
I have a Imacros script that activates a button which sends data to a server, which then sends data back to me. The data submission retrieval part is handled by a php script. Sometime the sever takes too long and the Imacros script times out. How do I get the Imacros script to wait for the info to load before executing the BACK command? I am currently using the WAIT SECONDS command to get this to work but sometimes 1 sec isn't enough and the script times out; it seems that there must be a better way to do this. Here is part of the current script I am using.
VERSION BUILD=8350307 RECORDER=CR
URL GOTO=http://localhost/asin3.htm
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:a2.php ATTR=NAME:Submitbutton
WAIT SECONDS = 1
BACK
TAG POS=2 TYPE=INPUT:SUBMIT FORM=ACTION:a2.php ATTR=NAME:Submitbutton
WAIT SECONDS = 1
BACK
TAG POS=3 TYPE=INPUT:SUBMIT FORM=ACTION:a2.php ATTR=NAME:Submitbutton
WAIT SECONDS = 1
BACK
...
TAG POS=160 TYPE=INPUT:SUBMIT FORM=ACTION:a2.php ATTR=NAME:Submitbutton
WAIT SECONDS = 1
BACK
...
Thanks
Re: Using tab Buttons on an HTML page - timeout
1. First of all I recommend rewriting the macro so that you could play it in loop mode
2. Let's assume that the server response is something like "... Submission is OK ! ...". So your macro may look like
I think the idea is clear.
Code: Select all
SET locUrl http://localhost/asin3.htm
SET currUrl EVAL("({{!LOOP}} == 1) ? '{{locUrl}}' : 'javascript:void(0);';")
URL GOTO={{currUrl}}
TAG POS={{!LOOP}} TYPE=INPUT:SUBMIT FORM=ACTION:a2.php ATTR=NAME:Submitbutton
WAIT SECONDS=1
BACK
Code: Select all
' max extra time to wait for the server response
SET !TIMEOUT_STEP 3
SET locUrl http://localhost/asin3.htm
SET currUrl EVAL("({{!LOOP}} == 1) ? '{{locUrl}}' : 'javascript:void(0);';")
URL GOTO={{currUrl}}
TAG POS={{!LOOP}} TYPE=INPUT:SUBMIT FORM=ACTION:a2.php ATTR=NAME:Submitbutton
WAIT SECONDS=1
TAG POS=1 TYPE=BODY ATTR=TXT:*OK*
BACK
Re: Using tab Buttons on an HTML page - timeout
Thanks or replying. Your help is appreciated.
I tried to run the code in the first panel exactly as you wrote it and got
RuntimeError: element INPUT specified by NAME:Submitbutton was not found, line: 5
Anthony
I tried to run the code in the first panel exactly as you wrote it and got
RuntimeError: element INPUT specified by NAME:Submitbutton was not found, line: 5
Anthony
Re: Using tab Buttons on an HTML page - timeout
Does the following code work fine in usual mode?
Code: Select all
SET locUrl http://localhost/asin3.htm
SET currUrl EVAL("({{!LOOP}} == 1) ? '{{locUrl}}' : 'javascript:void(0);';")
URL GOTO={{currUrl}}
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:a2.php ATTR=NAME:Submitbutton EXTRACT=TXT
TAG POS=2 TYPE=INPUT:SUBMIT FORM=ACTION:a2.php ATTR=NAME:Submitbutton EXTRACT=TXT
TAG POS=3 TYPE=INPUT:SUBMIT FORM=ACTION:a2.php ATTR=NAME:Submitbutton EXTRACT=TXT
Re: Using tab Buttons on an HTML page - timeout
This code works fine. It extracts the name of the button called by TAG POS = command.
Re: Using tab Buttons on an HTML page - timeout
OK. And what about this macro played both in usual and loop modes?
Code: Select all
SET locUrl http://localhost/asin3.htm
SET currUrl EVAL("({{!LOOP}} == 1) ? '{{locUrl}}' : 'javascript:void(0);';")
URL GOTO={{currUrl}}
TAG POS={{!LOOP}} TYPE=INPUT:SUBMIT FORM=ACTION:a2.php ATTR=NAME:Submitbutton EXTRACT=TXT
Re: Using tab Buttons on an HTML page - timeout
I get the looping but it doesn't extract the text. I get #EANF# each time instead of the button "txt." In fact the loop's command to extract the text times out and then repeatedly present the extract box with #EANF#.
Re: Using tab Buttons on an HTML page - timeout
I really appreciate you taking the time to help me with this.
Re: Using tab Buttons on an HTML page - timeout
The last code must work and I can't guess what may be wrong. However the loop problem wasn't your main issue. What d'you think about the idea from the 2nd part of my first post here?