Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
checkpoint exist or not
#1
Solved: 10 Years, 9 Months ago
Hi,

I am trying to test whether a checkpoint exist. If exist, do some. If not, do something else. Below code is giving me error.

Some one pls help. thx.

Code:
if Browser("..").Page("....").Image("Change Password").Check CheckPoint("Change Password_2").exist Then
msgbox "hgf"
else
msgbox "hgfhjg"
End If


Safi
Reply
#2
Solved: 10 Years, 9 Months ago
Hi,

You missed braces i.e.( ) here.
Try as given below.

Code:
If Browser("..").Page("....").Image("Change Password").Check (CheckPoint("Change Password_2")).exist Then
    msgbox "PASS"
Else
   msgbox "FAIL"
End If
Reply
#3
Solved: 10 Years, 9 Months ago
Hi,

Thanks. But it did not help eithere. It says ''object required''.
Not sure?

Safi
Reply
#4
Solved: 10 Years, 9 Months ago Wink 
Hi bangla123,

We can easily test the checkpoint results but testing the existence of a checkpoint is quite interesting & new. I don't think that exist method support the QTP (Specially 9.2 & older versions).Please double check this with new versions as well.

By the way please tell me the requirement of doing so.

Smile
Reply
#5
Solved: 10 Years, 9 Months ago
I am simply testing if checkpoint exist then do some. if not, do some.

This is the whole point.

Thanks.
Reply
#6
Solved: 10 Years, 9 Months ago Wink 
Hi bangla123,

Ok... We will try to find out the possible solution.
Please let me know whether QTP supporting Exist method for checkpoint at your end.

I am still not 100 % confident as at my system it's not supporting.

Smile
Reply
#7
Solved: 10 Years, 9 Months ago
Hi Bangla123 - Do you mean that you want to check the existance of a checkpoint with the script and do further action. that does not makes sense to me. existance of an object should be checked to the AUT not with the repository. would you ever try to check if a webedit test object exists in your OR before setting a value to it. I think - not. I cant think of any scenario like this so I would also like to know - why forces you do this in such way, please explain the case.

however you can do this in QTP - checkout objectrepositoryutil in QTP help (Object Repository Automation object). using this object you can go through your objectrepository. You can create a function to find the testobject in Object rep or may be GetObject method can be used to check if your checkpoint exists.

Reply
#8
Solved: 10 Years, 9 Months ago Wink 
Hi Saket,

Thanks for this very useful information.
I want to learn more about this checkpoint existence issue. May you please provide some link related to this?

Smile
Reply
#9
Solved: 10 Years, 9 Months ago
don't remember any good link for this now, but you will definitely see a post related to this on learnqtp in some time.
by the time,QTP help or may be google on this can help you . let me know for any confusions.

Reply
#10
Solved: 10 Years, 9 Months ago Wink 
Ok... I will follow your suggestion. By the way thanks for the quick reply...Smile
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Exist and Visible Are True When Objects Aren't There - Is there A Better Way? zunebuggy 3 2,719 04-24-2018, 02:12 PM
Last Post: Ankur
  Time Delay issue with Exist mv8167 11 23,968 06-19-2017, 02:56 PM
Last Post: grosorg
  Performance Issues Using '.Exist' AndyBSG 2 3,149 12-12-2014, 03:24 PM
Last Post: AndyBSG
  datatable column exist diya 3 12,177 12-11-2012, 11:24 AM
Last Post: elango87
  Check if exist not selected radiobutton sedin 6 7,434 09-12-2012, 12:55 PM
Last Post: sedin

Forum Jump:


Users browsing this thread: 1 Guest(s)