18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
Navigating to 8MB page creating problems
Hi,
In my script, on clicking a submit button, the browser navigates to a page of size 8MB.
Depending on the current download speed , it takes anywhere between 20sec to 150sec to load this page.
When it takes a lot of time to load, I get the "Stopped playback Failure" error message.
I used _wait(100000) statement to delay the execution of next instruction.
But _wait() statement increases the running time of the script when the bandwidth is high
How to handle this situation?
In my script, on clicking a submit button, the browser navigates to a page of size 8MB.
Depending on the current download speed , it takes anywhere between 20sec to 150sec to load this page.
When it takes a lot of time to load, I get the "Stopped playback Failure" error message.
I used _wait(100000) statement to delay the execution of next instruction.
But _wait() statement increases the running time of the script when the bandwidth is high
How to handle this situation?
Comments
Please help me solve this issue.
Warm Regards
Abhinaya
Open sahi/userdata/config/userdata.properties, and add
script.max_cycles_for_page_load=2400
Restart Sahi, and check.
To explain:
script.max_cycles_for_page_load is 1200 by default. It is configured in sahi/config/sahi.properties.
One can override necessary properties in userdata.properties, which is what we did.
Please look at sahi.properties to understand how this property works.
Regards,
Narayan
I have increased that to 3600. But it still get the below error:
Rhino lib:Step >_sahi._setSelected(_sahi._select("f1083"), "Add Child Forum");< did not complete in 390 seconds.
Here is my code:
<snip>
_click(_submit(" Save "));
//After clicking the submit button(using the above) the browser is redirected to the 8MB page
_sahi._setSelected(_sahi._select("f1083"), "Add Child Forum");
<snip>
I tried using exceptions. But didn't solve the problem:
<snip>
_click(_submit(" Save "));
try
{
_sahi._setSelected(_sahi._select("f1083"), "Add Child Forum");
}
catch(e){
_sahi._setSelected(_sahi._select("f1083"), "Add Child Forum");
}
<snip>
Please help me solve this issue.
Thanks
Abhinaya
Please help me solve this issue.
Thanks
Abhinaya
At the end of 390 seconds, is the page loaded?
Thanks,
Narayan
I don't get the "Stopped Playback FAILURE" message or anything....the script just halts....and i get the "Did not complete in 390 seconds" message in the command prompt.
Kindly help me solve this...
Abhinaya
Hi abhi,
I don't have exact idea about this property and all this stuff but yup......
if _wait(100000) is able to solve your "Stopped playback Failure" issue
then i can suggest to use
_wait(100000, <Some element from the page going to be loaded>);
for e.g. _wait(100000,_span("Add Child Forum"));
where _span("Add Child Forum") is the element present on the page going to be loaded.
so in case when bandwidth is low ....sahi will wait max up to mentioned time here and as you have told when bandwidth will high then as soon as sahi found element "_span("Add Child Forum")" on the page it starts execution of next steps, In this case it will not wait upto 100000 ms.
So there wont be any chance wastage of time during execution.
Hope this helps you!!!!
Please help me solve this issue.
@Akash, thanks for the tip
-Abhinaya
Have you tried increasing further than 3600? Within how much time does the page load? Can you time it and increase the number accordingly?
Thanks,
Narayan
Thanks for the reply.
The page uses Ajax extensively.
I am looking for something like waitForElementPresent in selenium.
Regards
Abhinaya
That won't fix this issue. Sahi will stop the script assuming that the max time out has exceeded. waits work when it is within the threshold.
Regards,
Narayan
Thanks a lot. That solves the issue.
Thanks for creating sahi.
Regards,
Abhinaya
I get the same problem again. But less frequently.
I think I am not using the wait statement properly.
There is a button in the 8MB page which is loaded in the end.
<input value="Save Form" id="saveform" ..../>
Can I use the wait statement like this?
_wait(180000, _submit("Save Form"));
Thanks
Abhinaya
You could try
_wait(180000, _isVisible(_submit("Save Form")));
Regards,
Narayan