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 |
Have you ever written a compiled module? If yes tell me about some of the functions that you wrote.
Why divide a test into three action calls?
Explain the concept of object repository?
whenever a scenario is recorded ever, it creates a object repository automatically (‘per action’ /local ). we do not need to make them individually…then why we need a shared object repository. How it will be practically utilized ?? your input will be highly appreciated..
if our qtp vb Script may be Currepted then What we want do?
what is the difference between window command and dialog command
What are the different types of Database checkpoints in QTP? when they are used?
What are the framework folders?
hi i have one doubt i have 4 yrs exp in testing and iam working one mnc in north but i have completed my degree correspodene is the companies are accept in south side some people are tellig they won't agree but i need correct answer plz let me know which companies are taking and not taking thanks in advance
Explain the concept of object repository and how quicktest professional (qtp) recognises objects?
one ok button and one text box is there.when i click on ok button in that text box one no. will display from 1 to 100 randomley.if that is not 100 when we click on ok button again ,again another text box ll created with another no. we will continue this till the text box created and displays 100.and when its 100 ok button should disabled. remember thet no will display not seriely ,it displays randomley,and each time new text box will created.
desribe a situation where u faced a stressful situation and how did u cope with it