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 test load test and block box testing an a web based application pls give ans briefly
Can we create a qtp test from qc?
Hi , I am facing issue QTP 10.0 with oracle ERP 11i .When QTP opens,click sub links on ERP ,FORM is not opening getting unexpected Internet explorer error message with send or don't send report.So unable to work with forms using QTP.
How to use output values in qtp ?
What is qtp window?
Give me At Least 5 Differences between DOCUMENTATION OBJECT MODEL(DOM)and COMPONENT OBJECT MODEL(COM)? Interviewer said me to WRITE the difference only in points not as you WRITE a paragraph ???? only in points
How do you check ticket cost and ticket number in flight application?
How to perform cross platform testing and cross browser testing using qtp? Can you explain giving some example?
Through array we can execute the testcase how ? give me example
Explain the concept of object repository?
Explain the types of object repositorys in qtp?
I have developed and executed a script successfully, and saved the same to QC. When I tried to execute the script from QC, the script is not executing. What are the possible reasons?”
How is a Step generator used in UFT?
To which environments does quicktest professional supports?
What is object spy in quicktest professional?