Micro Focus QTP (UFT) Forums
Facing Problem while writing Script for the Login Functionality. - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others)
+--- Thread: Facing Problem while writing Script for the Login Functionality. (/Thread-Facing-Problem-while-writing-Script-for-the-Login-Functionality)



Facing Problem while writing Script for the Login Functionality. - Rekha sharma - 06-19-2009

Hi Ankur,

Thanks for such an appreciating Effort for the beginners in Qtp.
I need Your help in writing script which can check following functionality:
"To limit the number of consecutive failed authentication attempts" of Login screen.



Thanks
Rekha


RE: Facing Problem while writing Script for the Login Functionality. - sarveshqtp - 06-19-2009

Please paste script here or explain the scenario


RE: Facing Problem while writing Script for the Login Functionality. - Rekha sharma - 06-19-2009

Hi,
The Scenario is :I Need to generate a script that can check whether a Message window appears for (3 wrong consecutive Password/Username Iterations) or not.Please tell me the Approach to do.


Thanks
Rekha


RE: Facing Problem while writing Script for the Login Functionality. - sarveshqtp - 06-19-2009

Code:
InvokeApplication "C:\Program Files\Internet Explorer\IEXPLORE.EXE gmail.com"
For i=1 to 3

Browser("Gmail: Email from Google").Page("Gmail: Email from Google").WebEdit("name:=Email").Set "sarvesh"
Browser("Gmail: Email from Google").Page("Gmail: Email from Google").WebEdit("name:=Passwd").Set "111111"

Browser("Gmail: Email from Google").Page("Gmail: Email from Google").webButton("name:=Sign in").Click
x=Browser("Gmail: Email from Google").Page("Gmail: Email from Google").webButton("name:=Sign in").Exist
If  x=0 Then
Reporter.ReportEvent 0,r1,Success
Exit for
End if
If i=3 Then
Reporter.ReportEvent 1,r1,Success
End If
Next

From:sarvesh.qtp@gmail.com

Make sure that there is no captcha image in your application


RE: Facing Problem while writing Script for the Login Functionality. - Rekha sharma - 06-19-2009

Hi,
Thanks Survesh for the quick Response.
Smile


Rekha