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.
Validating inputs in sahi
hi i am a new user of sahi, i would like to know how to validates inputs in sahi.. and how to implemnt it..
hope you can help me
tnx
hope you can help me
tnx
Comments
could you please explain further what you would like to achieve? What do you mean with validating input?
thanks
i just don't know yet how to use it
Validation of user inputs can be done in sahi.
To validate userinput,you can use function inside <browser></browser> Tags and call the function using _call(function()) API.
For example:
_setValue(_textbox("number"),1234);
_call(isNumeric());
<browser>
function isNumeric(){
var numericExpression = /^[0-9]+$/;
var numberfield=document.getElementById("number").value;
if(numberfield.match(numericExpression)){
_alert("Numbers");
}else{
_alert("Not Numbers");;
}
}
</browser>
This will popup an Alert message box with "Numbers".
Similarly the validation's can be done for any userInputs such as email,letters,empty field.etc.
Regards,
Theeran.
for helping me out...
this will be a big help for me using sahi...
i will try what you told me
thanks a lot...