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.
Simulating clicking the browser stop button.
Hi,
Anybody having any idea about how we can simulate clicking the stop button of the browser?
Stringy can you suggest something like using the history object for simulating clicking the back button.
Regards,
Pankaj.
Anybody having any idea about how we can simulate clicking the stop button of the browser?
Stringy can you suggest something like using the history object for simulating clicking the back button.
Regards,
Pankaj.
Comments
window.stop()
http://www.javascriptkit.com/jsref/window.shtml
Had thought of something like that but never tried it (am such a lazy guy) as couldn't find any document on this.
Will check this out first thing in the morning...
Thanks again..
Regards,
Pankaj
I tried your suggestion and the thing works and was what I was looking for. But it couldn't help solving my proble. What I need is to wait for a page to load for a certain period and after that forcefully stop the page loading. But the next step in sahi is executed only after the page is loaded completely. So in my case I am having the problem because the page never loads completely and sahi keeps on waiting for it to load completely to execute the next step. As the page never loads completely the next step (window.stop() in this case) never gets executed and sahi keeps on waiting.
Anyone any suggestions please.
Thanks and Regards,
Pankaj.
How about:
<<< do stuff >>>
window.stop()
<<< timer loop or do stuff >>> // http://www.w3schools.com/jsref/jsref_obj_date.asp
history.go(0); // reload the page
I tried to use window.stop() in conjunction with setTimeOut() but in vain.
The line of code appearing after the link click that leads to the desired page ( the page never gets completely loaded), sahi keeps on waiting and the next line of code (window.stop() in this case)never gets a chance to be executed..
Regards,
Pankaj.
Please guide if we can do something at our ends to make it better...considering i am naive at development.
I found this and was wondering if it was any help to you...
http://www.w3schools.com/htmldom/met_win_settimeout.asp
You guys are wonderful...
I used this after your suggestion to go through the w3school tutorials. but the problem remains same that sahi never gets to execute the next line of code as it keeps waiting for the page to load completely. I am not sure i am implementing it properly or not
I am sure 'we' will get to a solution
Regards,
Pankaj.