I'm trying to set up UI automation for Silverlight 3. I have a little test project that has 2 elements, a Button and a TextBlock. When you click the button the text is supposed to change.
I have been able to simulate a button click and the text does correctly change on the UI. However I am having problems retrieving the text from the TextBlock. UISpy shows that it is of type "text" but it also shows that it implements no control patterns. If I use a TextBox I can get the text correctly using a ValuePattern, but I would prefer to use TextBlock.
Does anyone know how to get the current text of a TextBlock from it's AutomationElement object?