When I use the Spy tool to look at various items in my Silverlight control, I notice that the 'images' are showing as type 'Picture', where as in regular HTML images show as 'IMG'. With an IMG I can get the source, but I cannot see how to get the source of the Picture within the Silverlight object. Is this possible?
Thanks,
Aracknid
Possible to get source of a Picture within Silverlight?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Possible to get source of a Picture within Silverlight?
Hi,
Silverlight
Microsoft Silverlight is an application framework for writing and running browser plug-ins or other rich internet applications, with features and purposes similar to those of Adobe Flash.
HTML
HTML is a markup language that web browsers use to interpret and compose text, images and other material into visual or audible web pages.
Regards,
Peter
Ranorex Team
This is true, because HTML and Silverlight are complete different technologies. Therefore you get a picture in Silverlight and an ImgTag in HTML.Aracknid wrote:I notice that the 'images' are showing as type 'Picture', where as in regular HTML images show as 'IMG'.
Silverlight
Microsoft Silverlight is an application framework for writing and running browser plug-ins or other rich internet applications, with features and purposes similar to those of Adobe Flash.
HTML
HTML is a markup language that web browsers use to interpret and compose text, images and other material into visual or audible web pages.
What do you mean by get the source of the picture? If you want to get the Inner-HTML, you can't get this for a picture. You are only able to get the hashcode.Aracknid wrote:but I cannot see how to get the source of the Picture within the Silverlight object. Is this possible?
Regards,
Peter
Ranorex Team
Re: Possible to get source of a Picture within Silverlight?
What I mean by source is the filename. I'm used to using the filename of the image to determine a state. For example, in a grid which is used to represent a "treeview" style layout, with expand/collapse icons and then an icon to represent the type of data (or the level of the tree, such as a folder or a file or an attribute of a file) then followed by text. I can find the picture no problem, but I cannot tell if it is a folder, file, or attribute because I cannot read the filename of the icon.What do you mean by get the source of the picture? If you want to get the Inner-HTML, you can't get this for a picture. You are only able to get the hashcode.Aracknid wrote:
but I cannot see how to get the source of the Picture within the Silverlight object. Is this possible?
Thanks,
Aracknid.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Possible to get source of a Picture within Silverlight?
Hi,
you could use image comparison to find out what kind of entry it is.
For that please read the answer to
http://www.ranorex.com/forum/question-r ... t2253.html
Regards,
Roland
Ranorex Support Team
you could use image comparison to find out what kind of entry it is.
For that please read the answer to
http://www.ranorex.com/forum/question-r ... t2253.html
Regards,
Roland
Ranorex Support Team
Re: Possible to get source of a Picture within Silverlight?
So for clarity:
1) Is the file name of the Picture not exposed by Silverlight?
or
2) Does Ranorex not support providing file name of Picture in Silverlight container (like SRC for an IMG tag)?
If 2, can I request this be added? It would be most helpful.
Thanks,
Aracknid.
1) Is the file name of the Picture not exposed by Silverlight?
or
2) Does Ranorex not support providing file name of Picture in Silverlight container (like SRC for an IMG tag)?
If 2, can I request this be added? It would be most helpful.
Thanks,
Aracknid.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Possible to get source of a Picture within Silverlight?
It is not exposed by UIAutomation, which we use internally to recognize and interact with Silverlight controls.Aracknid wrote:1) Is the file name of the Picture not exposed by Silverlight?
This is currently not technically possible since the underlying technology (UIAutomation) does not support that feature.Aracknid wrote:If 2, can I request this be added? It would be most helpful.
If you can change the application, you can as a workaround use another unused UIAutomation property like "HelpText" to make the file name of the picture available to Ranorex. I.e. you additionally assign the used path/file name to the UIAutomation.HelpText property of the picture control and then you can use the Ranorex.UIAutomation.HelpText property to get that value (see the Ranorex User Guide for more information on adapters).
Regards,
Alex
Ranorex Team
Re: Possible to get source of a Picture within Silverlight?
OK, I know I'm coming off as an idiot, but I don't see how to use the Ranorex.UIAutomation.HelpText as you suggest...
In my code, I have something like this:
If I type in "Ranorex.", the intellisense pop up does not have UIAutomation in it.
I'm not sure how to access it.... please help...
Thanks,
Aracknid
P.S.: As an aside I really appreciate all the help you guys provide, but if I could make any suggestions, it would be to have code examples for all the API documentation. I know that is probably a lot of work, but it would probably really be helpful to all your users, especially me
In my code, I have something like this:
Dim MyPic as Ranorex.Picture MyPic = sRXPathToPictureSo I have the Picture element, and when I type "MyPic." the intellisense pop up does not have UIAutomation or HelpText in it.
If I type in "Ranorex.", the intellisense pop up does not have UIAutomation in it.
I'm not sure how to access it.... please help...
Thanks,
Aracknid
P.S.: As an aside I really appreciate all the help you guys provide, but if I could make any suggestions, it would be to have code examples for all the API documentation. I know that is probably a lot of work, but it would probably really be helpful to all your users, especially me
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Possible to get source of a Picture within Silverlight?
Hi,
Please use following code to get the help text property of UIAutomation
Peter
Ranorex Team
Please use following code to get the help text property of UIAutomation
Dim uiaPic As Ranorex.UIAutomation = "yourRxPath" Dim helpText as String = uiaPic.HelpTextRegards,
Peter
Ranorex Team
Re: Possible to get source of a Picture within Silverlight?
When I type "Ranorex" and then "." (the period), I do not have "UIAutomation" in the popup from VS2010.
Do I need to add a reference to some Ranorex DLL other than the main one? I've got a reference to Ranorex.Core.Dll.
Thanks,
Aracknid
Do I need to add a reference to some Ranorex DLL other than the main one? I've got a reference to Ranorex.Core.Dll.
Thanks,
Aracknid
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Possible to get source of a Picture within Silverlight?
Sorry I forgot this. You need also the reference Ranorex.Plugin.Wpf. The UIAutomation is nested in this library.
Regards,
Peter
Ranorex Team
Regards,
Peter
Ranorex Team
Re: Possible to get source of a Picture within Silverlight?
It's been a while, but I'm revisiting this because I was talking to the developer and asked him about providing the filename in the HelpText property, and he looked at me like I had 3 heads.
Long story short, my developers have no idea what UIAutomation is and in their code (they are using .Net 4 C#) the "Image" can only be set to have a source property set, and one other value which I cannot recall. He looked at at Ranorex Spy with me and said he didn't understand why you cannot pass on the filename, because in his development world his development spy tool can.
I guess really what I need is an understanding of telling them how to provide me with what I need. Ranorex UIAutomation is a different "language" than what they are working in and they don't see how to help me...
Any pointers?
Thanks,
Aracknid.
Long story short, my developers have no idea what UIAutomation is and in their code (they are using .Net 4 C#) the "Image" can only be set to have a source property set, and one other value which I cannot recall. He looked at at Ranorex Spy with me and said he didn't understand why you cannot pass on the filename, because in his development world his development spy tool can.
I guess really what I need is an understanding of telling them how to provide me with what I need. Ranorex UIAutomation is a different "language" than what they are working in and they don't see how to help me...
Any pointers?
Thanks,
Aracknid.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Possible to get source of a Picture within Silverlight?
Hi,
UIAutomation:
http://msdn.microsoft.com/en-us/library/ms747327.aspx
UIAutomation Properties:
http://msdn.microsoft.com/en-us/library/ms752056.aspx
Regards,
Peter
Ranorex Team
Here is the official MSDN documentation of Microsoft forAracknid wrote:I guess really what I need is an understanding of telling them how to provide me with what I need. Ranorex UIAutomation is a different "language" than what they are working in and they don't see how to help me...
Any pointers?
UIAutomation:
http://msdn.microsoft.com/en-us/library/ms747327.aspx
UIAutomation Properties:
http://msdn.microsoft.com/en-us/library/ms752056.aspx
Regards,
Peter
Ranorex Team