Hi Friends,
How to trap an error message on Web page through QTP.
Example:- When I put wrong user id or Password on a web
page, I get the error message.
So when I add the error object in Reposatory, every time it
shows as Login Failed Object exist, eventhough using corret
login details.
And if I do the same without adding the object it shows as
object not found.
This might be because while recording QTP takes every new
page as _1 _2 _3 and so on. as below.
Browser("XXXXX").Page("XXXXX_1"). >>login
Browser("XXXXX").Page("XXXXX_2"). >>Inbox
Browser("XXXXX").Page("XXXXX_3"). >>Sent Items
I used below code.
Browser("XXXXX").Page("XXXXX").WebEdit("firstname").Set
strFN
Browser("XXXXX").Page("XXXXX").WebEdit("lastname").Set strLN
Browser("XXXXX").Page("XXXXX").WebEdit("userid").Set
strUserID
Browser("XXXXX").Page("XXXXX").WebEdit("password").Set
strPass
Browser("XXXXX").Page("XXXXX").WebButton("Login >").Click
If Browser("XXXXX").Page("XXXXX_2").Image
("msg_icon_error").Exist 5 Then
Reporter.ReportEvent micFail, "XXXXX", "Login Failed!"
ExitRun (It shows login failed ever after login is passed.
Else
Reporter.ReportEvent micPass, "XXXXX", "Login Successful!"
End If
Please find out a way for me here, and provide me with the
correct code.
Thanks in Advance.
Answer / hokrani
You have to do setting....
Go to Tools > Options
Click on Web tab
Click on 'Page/Frame Options' button
Then select following check box
Ignore non user-input data - Get
Ignore non user-input data - post
and click on 'OK' button.
Once u done this setting, next time page is stored page1,
page2 in OR.
Is This Answer Correct ? | 0 Yes | 1 No |
Local Obj Repository and SOR are editable know, y we have to edit those.. i mean in which situation we need to edit those and how to do..? pls help me..
Hi All, I'm Akshaya here, could anybody please help me regarding how to import the excel sheet to run time datatable. But Pl. keep it in your knowledge is that excel sheet is opened. Thanks, Akshaya Madali 9823213538
In an(AUT) web application their are two frames as fraMain and fraFooter. Both the frames contain link which needs to be retrieved at a single step. I tried it using "Regular Expression" as fra.* but QTP doesn't recognize the object. So Plz help me out to get resolve the problem:-)
Which scripting language used by quicktest professional (qtp)?
requirement is for combo box your expected value is str= "Denver.Frankfurt.London.Los Angeles.Paris.Portland.San Francisco.Seattle.Sydney.Zurich" you must get the text in combo box and need to compare them how
Whenever we r keeping mouse pointer under the image we r getting image name. In qtp how can we do this thing.weather that name is coming or not?
If u r using library files (Instead of Check Points) , How do u do bitmap check ?
How does you test a weblink which is changing dynamically?
What is difference between run time object and test object?
What is BPT?
How does QTP identifies the object in the application?
Explain different checkpoints in qtp.