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
I am in .Net development for past 3.5 years and want to enter in to automated testing and learn QTP. For this I need some good tutorial for beginners. I will be really greatful if any one has and they can send it to me on this address- ruchidureja@gmail.com
i have asked earlier only one question how to test web application using QTp plz send me the answer quickly
wht type of User defined functions or Java Releated functions Do we write in VB scripting
How to read a text file from QC using QTP. I would like to do something like this. But instead read a file from QC and NOT from my local drive. Set fso = CreateObject("Scripting.FileSystemObject") Set InputFile = fso.OpenTextFile("C:\test.txt", ForReading) Thanks
Can any one say what exact diff between test->parameters, action properties-> parameters. after defining the parameters in test->settings, how can we access those parameters.(i know how to use action prop parameters)
What is qtpro? What is quick test pro?
explain abt dyanamic changing object with example?
There is an excel file of 1 to 100 sheets how you will iterate through it?
i am looking job in perfomance testing using Loadrunner any one help me a project plz......?(Chandana) chs_29@rediffmail.com
Explain runtime dynamic settings?
I am a newbie to QTP / Automation testing. I want to develop a script that creates a data file automatically with proper headings using VBScript in QTP.
How many tabs are available in debug viewer pane?
What is a data driven test in qtp?
When Recovery scenario actually starts while testing the application?
Write the code for,In the page screen we have total 10 Links,out of these I have to click 9th link