i am new to qtp i do not know how to write script
how to write the code to login if it fails how to able
error messages
Answer Posted / shyam.meghansh
if Dialog("Login").Exist then
Dialog("Login").WinEdit("Agent Name:").Set DataTable
("A",dtLocalSheet)
Dialog("Login").WinEdit("Password:").Set DataTable
("B", dtLocalSheet)
Dialog("Login").WinButton("OK").Click
' Check for invalid user and password
If Dialog("Login").Dialog("Flight
Reservations").Exist Then
Dialog("Login").Dialog("Flight
Reservations").WinButton("OK").Click
Reporter.ReportEvent
micfail,"Login","Invalid User /Pwd Check"
msgbox "Invalid User /Pwd Check"
ExitRun(0)
End If
else
Reporter.ReportEvent
micfail,"Login","Login Dialog not exists"
msgbox "Login Dialog not exists"
ExitRun(0)
end if
................. any more question them let me know.......
mail to testingwithshyam@gmail.com
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How to define array in qtp?
if there is a web table of having row and colmns.a button is placed at 2nd row's 3rd column which is worked for both edit and delete..how to write script for the button to test both operation on the web table using desriptive programing.. plz help me on script wheather using getroproperty Q2)what is the command for taking valiue from a web table in qtp
give me the code to save all messages of inbox of gmail into a folder and notepad
Hybrid framework supports Descriptive programming. Is it true?
What phases are involved in testing an application in qtp?
Mention the different actions types of qtp.
Explain the concept of object repository?
I want to read XML file loaded in Quality center and compare the values with the values displayed in Application (web table).How can I do that
what is object and child object.. explain ..if possible give some example for better understanding ..
What is the latest version of qtp?
What are the automation metrice in your project?
What is object repository in qtp?
Is qtp supports uni-code?
How to create scenario selector
What is the syntax to call one action in another?