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 |
Hi I am new to QTP. can u please answer to my qus... suppose 3 excel sheets are there * we are trying to check for login credentials for a page. userid from excel1 , password is from excel2 whether the page is opened or not that checkpoint is result is should be stored in excel 3.... this qus i have faced in IBM technical round... please tell script for above query ... please please
how will you handle the situation when object is not caputred during record?
in one page we have 100 links i have to click the 99th link how can i click the 99th link.
4 Answers GK Technologies, IBM,
I got an error "The"flightres" Dialog was not found in the Object Repository. Check the OR to confirm that the object exists or to find the correct name for the object." while running the following script Set flightres=description.Create() flightres("text").value="Login" flightres("Class Name").value="Dialog" Set agent = description.Create() agent("nativeclass").value="WinEdit" agent("attachedtext").value="Agent Name:" Set pwd = description.Create() pwd("nativeclass").value="WinEdit" pwd("attachedtext").value="Password" Set button = description.Create() button("nativeclass").value="WinButton" button("Text").value="OK" Dialog("flightres").WinEdit("agent").Set "test" Dialog("flightres").WinEdit("pwd").Set "mercury" Dialog("flightres").WinButton("button").Click Please let me know if i made any mistake in the above script...?
wt is frame work wt r d different types of frame works used in ur company
i m fresher iwant to know about testing what is the scope of testing field.i m aware in manual testing shall i go to automatiuon testinh directly or if any work experinc in manual testinh then only i go to manually automation testing.
could any help me please, how to work on visual foxpro application using UFT
What are benefits of qtp?
How do you test DLL files using automation Tool QTP?
can anyone answer this question ........in the DICTIONARY OBJECT....i created the dictionary object in reserved object ok....here i have some sets of values ...now i want to retrieve the item i done too ok.......here my question is now i saved the test and close the qtp tool ,again i opened now i retrieve the same item in the dictionary is it possible ????. friends when i try to do this i am getting empty message box i mean no value will be retrieved ......ans me any one plz...
I want to learn QTP Online, where can I get quality training?
can we create recorset with out using database connection in vbscript?