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
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / satyaprasad
dialog("login").active
dialog("login").winedit("username").set"asdf"
dialog("login).winedit("password").setsecure"amxcer013m34ee"
dialog("login").winbutton("ok").click
Note:for descriptive programing we must add the objects of
the application to "Object repository"
| Is This Answer Correct ? | 2 Yes | 1 No |
HI...What Satya..we dont need add objects to repository for
descriptive programming.
come to scenario....
dialog("login").winedit("Agent Name:").set datatable.value(1)
dialog("login").winedit("Password:").setsecure
crypt.encrypt(datatable.value(2))
dialog("login").winbutton("OK").click
If dialog("Login").dialog("text:=Flight Reservations").exist
then
dialog("Login").dialog("text:=Flight
Reservations").winbutton("text:=OK").click
dialog("Login").WinButton("Cancel").click
Else
window("Flight reservation").close
end if
like this we can handle pop up messages...
If any queries..
nanda.dreddy@gmail.com
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / pravati
Browser().page().webedit().set "mailid"
Browser().page().webedit().set "password"
Browser().page().webbutton().click
if
Browser().Page().Link("Home").Click exist
then
msgbox "login pass"
else msgbox "login fail"
| Is This Answer Correct ? | 0 Yes | 0 No |
How do u write script in qtp? where do u write?
how will we run batch tests in qtp what is the process to run the multiple test sets?
In web page there is five OK buttons available, while recording i click on 3rd OK button, How QTP identify the 3rd OK button while running script? Is qtp identify 3rd ok button?
Mention what are the different types of recording modes in qtp? Which will be used when?
Hi Suppose u have complex Test scripts which u vl write first and which u vl execute first
what is smart identification in qtp? pls any give details? thanks in advance
Hi Friends, Every one is posting the Answers for the existing questions.Try to post the questions that are asked in Recent Interviews.It will be useful to the other Job seekers.
setroproperty and getroproperty difference
If u don't have any Knowledge on perticular application but they give that application to u for Testing ? Then How we wil move towards testing on that application?
In QTP if u got a defect , how to report to developer using Test director or Quality center .
What is the difference between QTP 8.2 object repository and QTP 9.2 object repository Any body have an please give Answer Mail id: nagireddy.sn@gmail.com
can we call runaction in the funcion