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 open a HTML file in the script
Im trying to open a html file called "xxposting.html"
window.open('xxPosting.html'); tried to test it works but when given in script it fails.
Please could anyone help me at the earliest.
Thanks,
window.open('xxPosting.html'); tried to test it works but when given in script it fails.
Please could anyone help me at the earliest.
Thanks,
Best Answer
-
When you want to do some sahi stuff like assertions on the xxPosting, you will need a server providing this file.
maybe some information why you want to open this file would help

Answers
Need to do the following,
1.Open the xxposting.html (tried to open it with _navigate "http://xxtesting/_s_/spr/xxPosting.html"
2. "Browse"to Upload xml file and "Submit Query"
Assert-->Browse amd submit query button available on the page
-->Upload xml file and submit it successfully
point 1 successful but point 2 fails doesnt recognize the buttons !! tried with _setfile the error received is _setFile(_sahi._file("file"), "C:\\sahi\\userdata\\scripts\\Client6.xml");< did not complete in 150 seconds.
Done with server providing the file.
Please could you explain the difference between setFile and setfile2.
Now Im struck after opening the html file in the same window -how to go a new url?
Tried _navigateTo getting this error
ERROR
Step >_sahi._navigateTo("http://xxxtesting/xxx/login.htm"
Regards