script for Login application using data pools
I had written a script for Login application like
taking different user name and passwords from the data pool.If the username is wrong How I have to write the script for the wrong user name.Just displaying in the log file as wrong user name and the remaining scripts have to be continued.
Below was the script
Dim Result As Integer
Dim dp_id as long
Dim dp_results as long
Dim I as Integer
dp_id = SQADatapoolOpen ("login", FALSE, SQA_DP_SEQUENTIAL, FALSE)
for I=1 to 10
dp_Result = SQADatapoolFetch (dp_id)
Window SetContext, "Name=frmSecLogin", ""
EditBox Click, "Name=txtUserID", ""
call SQADatapoolValue (dp_id, 1,password)
EditBox Click, "Name=txtPassword", ""
PushButton Click, "Name=cmdLogin"
Window SetContext, "Name=frmMain", ""
GenericObject Click, "Type=Image;Name=imgExit", ""
Window SetContext, "Caption=PRISM;Class=#32770", ""
PushButton Click, "Text=Yes"
[ 01-08-2004, 12:18 PM: Message edited by: hanuman ]
Re: script for Login application using data pools
After attempting the login, do a check for a condition that occurs if successful (image displayed) and also a check for a condition that occurs if failed (text or other). 3 possibilities need to be handled: fail, pass, unknown.
</font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">Attempt login
If companyLogo doesn't exists
If failureMessage appears
exit loop -or- goto failureHandler
Log unknown condition
exit Loop -or- goto failureHandler
Continue with your script</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">