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.
Any sample scripts for Login/passowrd
I am looking for sample scripts for login/password through button.
Thank you in advance!
-
Sudhir
Thank you in advance!
-
Sudhir
Best Answer
-
Hi Sudhir,
Try the following script:
_navigateTo("http://sahi.co.in/demo/training/"); _setValue(_textbox("user"), "test"); _setValue(_password("password"), "secret"); _click(_submit("Login")); _click(_button("Logout"));
It is a simple script where you provide login credentials and submit them.
Regards.
Answers
-- IE source from sahi training----
<form name="loginForm" onsubmit="return false;">
<div id="errorMessage" style="display:none;color:red;">Invalid username or password</div>
<table class="test">
<tr><td>Username</td><td><input type="text" name="user" value=""></td></tr>
<tr><td>Password</td><td><input type="password" name="password" value=""></td></tr>
<tr><td> </td><td><input type="submit" value="Login" class="button" onclick="login()"></td></tr>
</table>
</form>
---My App source---
<tr id=_z7snl valign=middle>
<td class=ffl>
<label for=_$eseed>Login Name:</label></td>
<td class=ffi><span id=_fbgoob><img alt="" border=0 height=11 width=10 src="/EasyCare/docroot/ariba/ui/aribaweb/cleardot.gif"></span></td>
<td class=ffp>
<input bh=TF class="tf tfW" value="" id=_$eseed type=text name=_2nakec><div class=rr id=_1cpb1c>
</div>
</td>
</tr>
<tr id=_wmqizc valign=middle>
<td class=ffl>
<label for=_jbshdb>Password:</label></td>
Now, for above code, what would be testbox and password value
Thank you in Advance!!
The script to login depends on various things which are different for each webpage.
You can use the controller to record loggin into your webpage. You will automatically get the script that you need to run.
Regards.