Ask a Question

Silverlight Properties: Binding

QA-Joseph
Occasional Contributor

Silverlight Properties: Binding

Greetings,



I am attempting to extract a binded value, $1,390.82, from a Silverlight property, and have attached the TC 7.51 Object Properties results and a screen print of the target object. Upon review of the Object Properties screen print you will note that the text "$1,390" is not displayed.



The Silverlight code below displays the "$1,390.92" text on the web page via a binding, "abc.abcPrice".



<StackPanel Orientation="Horizontal" >                    



                <TextBlock x:Name ="txtClaimTotal" Margin="5,0" Text="{Binding abc.abcPrice, Converter={StaticResource NullMessageConverter}}" />                    



</StackPanel>



The "Name" property is available, but do you have an idea as to how I can extract the binded value from "Text"?



Thanks in advance for your assistance.



Best regards,



Joseph
4 REPLIES 4
QA-Joseph
Occasional Contributor

RE: Silverlight Properties: Binding

Greetings,



Please find attached a screen print of the "Text" property and its value "$1,390", as mentioned in the post thread that was obtained via Silverlight Spy.  I hope this information helps in your review of my question.



Best regards,



Joseph

RE: Silverlight Properties: Binding

Hi Joseph,




Try using the NativeUIAObject.Name property to obtain the text. If the value of the property is empty, to help us investigate the problem, please send us a simple application demonstrating the problem via our Contact Support Form (http://www.automatedqa.com/support/message/).

--
Dmitry Nikolaev

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
QA-Joseph
Occasional Contributor

RE: Silverlight Properties: Binding

Hello David,



The TC 7.51 code below returns the text "txtTotal", not the binded value $1,390.82.



  x = Sys["Process"]("iexplore")["Page"]("http://abc/abc/abc.aspx");



  x1 = x["Form"]("form1")["Panel"]("silverlightControlHost")["UIAObject"]("Silverlight_Control")["UIAObject"]("txtTotal");



  Log["Message"](x1["Name"]);



In the TC 7.51 Object Property view,  Name  =  UIAObject("txtTotal").



I am in the middle of a produce release testing cycle and will submit the Silverlight code sample to you promptly.



Thanks in advance for your support.



Best regards,



Joseph



RE: Silverlight Properties: Binding

Hello Joseph,




The Name property returns the name of the object. You need to use the NativeUIAObject.Name property. Try using the code below and let me know your results:




x = Sys["Process"]("iexplore")["Page"]("http://abc/abc/abc.aspx");

x1 = x["Form"]("form1")["Panel"]("silverlightControlHost")["UIAObject"]("Silverlight_Control")["UIAObject"]("txtTotal");

Log["Message"](x1["NativeUIAObject"]["Name"]);

--
Dmitry Nikolaev

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
cancel
Showing results for 
Search instead for 
Did you mean: