Absent Member.
Absent Member.
1029 views

UFT 12.52 Exist() seems is not working in overloaded method

When I use Exist() method inside an overloaded method then it always returns FALSE like the object doesn't exist eventhough same object can be clicked or highlighted. Does anyone encountered this situation?

Public Function MyClick(objControl)

            objControl.Highlight() -> highlight the object OK         

            If objControl.Exist(10) Then

                        'do something

            Else

                        'failure -> goes on the failure branch

            End If

            objControl.Click -> working OK

End Function

RegisterUserFunc "Link", "Click", "MyClick" 

Browser("CreationTime:=0").Page("title:=.*"). Link("html id:=some_id").Click()

Thanks

0 Likes
5 Replies
Commodore Commodore
Commodore

Not sure if this is a 12.52 specific issue, however try registering your funciton name to something different than "Click".  I.e. call the function "MyClick" instead of "Click" from the class persepective; see if there's a change.

 

 

0 Likes
Absent Member.
Absent Member.

I am also facing the same issue. When you are passing object to a function which returns the object and using Exist method is not working. any solutions. 

0 Likes
Absent Member.
Absent Member.

anyone got solution for this. When using descriptive programming and sending that object to exist (user defined function) Exist method is not working. I have tested in UFT 12.52

0 Likes
Absent Member.
Absent Member.

Try this way and see if it works -

If objControl.Exist(10) = True Then

' do something

Else ...

 


Accept as solution/Give Kudos to the author if the piece of information answered/helped you to solve your problem.
All the thoughts here are mine not related to my employer nor anyone.
0 Likes
Absent Member.
Absent Member.

Hi, Even am facing similar issue, with UFT 12.52 and 12.53, However there is no issue with UFT 12.5.

Did anyone able to resolve the issue with Object.Exist  in UFT 12.52 or UFT 12.53

 

Thanks

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.