Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What VBScript operators, functions, and statements do you use in QuickTest Professional?

2665


How to find the name of the machine where you are running your automation scripts in qtp?

1001


How to check which add-ins are associated with a test in qtp?

1109


what is the diffrence bw qtp architectute and qtp framework?

2005


can any one please tell me which is the best institute in Bangalore to learn QA (crash course)? Thanks

2100


Excel sheet having some datas and some datas present in the application (in table). How will you compare these two datas? Write code to fetch datas from Excel sheet.

1981


wht type of User defined functions or Java Releated functions do we write in VB scripting

2245


i can done the project with QTP in that time i can say how many members in my team size?

1920


How we can import data from database?

1226


Print the Prime numbers in below format only up to 20(Need commas also) 1,2,3,5,7,9,11,13,17,19

1630


Name the properties you would use for identifying a browser and page when using descriptive programming?

1015


How QTP support all types of applications (platforms)?

4542


Can you brief the hurdles you faced during Automation testing?

1051


How to change the priorities of the recovery scenario properties?

1178


How to creating an output value using quicktest professional (qtp)?

1015