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.
Put javascript/call a javascript from sahi
I would like to call make a simple javascript run in sahi without substituting it with a sahi code.
eg: document.getElementById("elementID").click();
Is there a way to put in javascript or call a another script in javascript from sahi? How?
Hope you can help!
tnx!
eg: document.getElementById("elementID").click();
Is there a way to put in javascript or call a another script in javascript from sahi? How?
Hope you can help!
tnx!
Comments
I think you can include your required javascript by adding it to the C:\sahi\config\inject_top.txt file but doing this will inject it everytime irrespective of the sahi script being run. You can then call the functions residing in that jscript.
Also have a look at _execute() function.
I am sure there must be better ways of doing this but at thi point of time thisis all i can think of.
Regards,
Pankaj.