Hi all , I am new at QTP I want a sample script to check
validation messages(For java script or VB script) for login
page with for web based application.. Any one can Help. I
have to complete it in two days I need urgent help..
Ex. if I want to check mail.yahoo.com
1 > If user doed not exist it display "Username does not exist"
2> if invalid Uname and password then it display" Invalid
Uname or pass"
3> Loing Sucssessfully.
I want to check this types of application by using data
table to give values of username and password..
Thanks
Answer Posted / amjad
Open()(It is a function to open the application)
Browser("Browser").Page("Gmail: Email from Google").WebEdit
("Email").Set "User id"
Browser("Browser").Page("Gmail: Email from Google").WebEdit
("Passwd").SetSecure "************"
Browser("Browser").Page("Gmail: Email from
Google").WebButton("Sign in").Click
If Window("gmail").Exist then
reporter.ReportEvent 0,"Checking Login","details given are
correct"
Window("gmail").close
Else
Browser("Browser").Page("Gmail: Email from
Google").WebButton("Sign in").Click
Browser("Browser").Page("Gmail: Email from
Google").WebButton("Sign out").Click
reporter.ReportEvent 1,"Checking Login","details given are
not correct"
end if
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
How to create Reusable and Multiple Actions?
How you can make an action as re-usable action?
What are the major/ important methods, functions in QTP we use realtime testing
In the Hybrid framework, data can access the database, excel file, XML etc. Is it true?
i am new QTP... please tell me automation frameworks , types & for whiich type of applications frameworks are used & how to generate script in keyword driven framework
how to find that a file has been completely downloaded or not? I told that "download Complete" pop up. but he told the tool doesn't recognize the pop up
How did you use regular expressions in QTP and also in WR?
How will you declare a variable in qtp?
Can launch two instances of qtp on the same machine?
How to export quicktest professional (qtp) results to an .xls file?
In the application that I'm testing is having a WYSIWIYG editor.QTP is recording editor's body as web element. I want to add some data to this web Element at run time. The problem is that I cant find a method to add contents to this web Element. Can any one come up with an answer for this. Thankx.
How to find operating system information using the qtp script?
Is text area check point supports for web applications?
What are the differences between table and db checkpoints?
How can I check if a environment variable exist or not?