Deepak111 Absent Member.
Absent Member.
205 views

Getting the Picture property

Hi,

 

What's the way to find out if there is a picture on a command button or not ? 

 

I have been trying different ways to retrieve the 'Picture' property but it does not seem to be working.

 

1. Set obj = VbWindow("XXX").ActiveX("Command1").Object.Picture - returns a General error since the Picture object is not returned which is not suported in VBScript.

 

2. Adding 'Picture' proeprty to the Object Identification section and then using the code

 

Set chk = VbWindow("XXX").ActiveX("Command1")

 

If chk.GetROProperty("picture")="Object Reference" Then

               Msgbox "No Picture"

Else

               Msgbox "Picture is there"

End if

 

does not work since it always returns 'Object Reference'.

 

Can someone suggest anyother way ?

 

 

0 Likes
1 Reply
Highlighted
Absent Member.. Murali0008 Absent Member..
Absent Member..

Re: Getting the Picture property

Hi Deepak - You could try the insight recording feature in the UFT 11.52 to capture the image and chk if it exists.

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.