How to know qtp object exists or not?
This post is very much useful for qtp beginner.
I am going to give step by step procedure to verify qtp object exists or not. So please go through simple following procedure and you will be able to verify object existence very easily.
1. Suppose you want to check that on http://google.com home page “Google Search” object is exist or not.
2. So after recording the test case (you have to click on “Google Search” object during recording) you will get one sentence like following.
3. Now in above sentence you have to remove click and write exist method to verify the object. So above sentence becomes like following,
If (Browser(“Google”).Page(“Google”).WebButton(“Google Search”).exist) then
Msgbox “object exists”
Msgbox “object doesn’t exist”
So Thus you can verify any qtp object exists or not easily. Let us know if you encounter any issue. You are always welcome to share your experience which will be helpful for our qtp learner friends.