When I use Spy on a picture from Silverlight, Spy shows In General --> Role (picture) --> Icon
How do I access the info of this icon section. Specifically I'm looking at the Tag property.
If you provide code, VB please.
Thanks,
Aracknid
Accessing Icon info of a Picture from Silverlight
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Accessing Icon info of a Picture from Silverlight
Hi,
the following code provides the attributes and the attribute values for a picture element.
If you are writing Tag property, what exactly do you mean with tag property.
Regards,
Martin
Ranorex Support Team
the following code provides the attributes and the attribute values for a picture element.
Code: Select all
Dim pictureImage = repo.WebDocumentSilverlight_Toolkit_Samp.PictureImage
For Each attribute As AttributeDescriptor In pictureImage.Element.Attributes
Report.Info(Convert.ToString(attribute) & ": " & vbTab & Convert.ToString(pictureImage.Element.GetAttributeValue(attribute.ToString())) & vbLf)
Next
Regards,
Martin
Ranorex Support Team
Re: Accessing Icon info of a Picture from Silverlight
The reason I was hoping to get the Tag was because we are trying to figure out a way to pass the source file through Silverlight to Ranorex so I know what picture is what. You suggested we look into UIAutomation in another post (http://www.ranorex.com/forum/possible-t ... t2288.html), but that was not something warmly excepted by the development team.
This lead them to be willing to try other things... I was asked if I could read the Image Tag property, and I said maybe... There's a Tag property for icon visible in Spy tool...What ever they did on the dev side didn't seem to work, since I still saw nothing. Then they tried something called HelpText, and it showed up in Spy in the UIAutomation section... See picture, and scroll to bottom.
So now I need to figure out how to read the HelpText property of the Picture element's UIAutomation section. I managed to do it, but it seemed to be a lot of code and I had to add a bunch of references. Is there an easy way?
Aracknid
This lead them to be willing to try other things... I was asked if I could read the Image Tag property, and I said maybe... There's a Tag property for icon visible in Spy tool...What ever they did on the dev side didn't seem to work, since I still saw nothing. Then they tried something called HelpText, and it showed up in Spy in the UIAutomation section... See picture, and scroll to bottom.
So now I need to figure out how to read the HelpText property of the Picture element's UIAutomation section. I managed to do it, but it seemed to be a lot of code and I had to add a bunch of references. Is there an easy way?
Aracknid
You do not have the required permissions to view the files attached to this post.
Re: Accessing Icon info of a Picture from Silverlight
Please ignore my previous post above. I was not properly informed by the developer working on this. It turns out that he did use the UIAutomation class and he did stuff the HelpText property with the file name as per your suggestions in the other post.
Also, I figured out the easy way to read the UIAutomation values from the Ranorex element.
Aracknid.
Also, I figured out the easy way to read the UIAutomation values from the Ranorex element.
Aracknid.