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.
How to refresh sahi browser?
Best Answers
-
Hi Shashi,
Please try using the following command:_execute(location.reload());
Regards -
Hi Shashi,
Try using :
ORbrowser.execute("location.reload()");browser.executeStep("location.reload()");
Let me know if it works for you.
Regards.
Answers
Thanks for replying.
If possible, can you please write using java.
Thanks
browser.execute("location.reload()"); is working fine for refrsh.
But in my case after logout, sahi stops playing and even refresh command does not work.
When i manually refresh the browser it again starts playing.
Thanks.
Can you provide the URL of your page and your script?
Regards.
url is : http://www.explic8.com
Code:
Browser browser=null;
for(int i=0;i<2;i++){
browser= new Browser("firefox");
// browser= new Browser("chrome");
// browser= new Browser("opera");
browser.open();
browser.navigateTo("http://www.explic8.com ");
browser.execute("location.reload()");
try {
Thread.sleep(4700);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
browser.execute("location.reload()");
browser.close();
}
For firefox, above code is working fine but for chrome it is not working.
Thanks.