aazimurj
11 years agoOccasional Contributor
TestComplete 10 fails to identify textblock inside ScrollViewer control
Hi,
I am facing problems where TestComplete cannot identify textblock control and its contents inside ScrollViewer Control
My application is running on IE10 and Silverlight 5
My TestComplete version is 10.10.752.7
Scripting Language: VBScript
Preferred Style: Keyword Scripting
I am trying to record a script to read Build Number information from About popup control of my application. The about popup is a simple control which includes version information and system Requirements details.
Now when I used TestComplete Object Browser I can see few buttons and ScrollViewer control (please see TestCompleteObjectBrowser.png)
If I use free version of http://firstfloorsoftware.com/silverlightspy , then I can see that Text which I am after, this text is inside TextBlock Control which is inside this ScrollViewer control. (Please see silverlightspyObjectBrowser.png)
I am sure that I have patched my application with tcAgPatcher.exe utility and I have also tried FindAllChildren method but it didnt return me required object
sub getText()
dim p, w, textblock, i
set p = Aliases.browser.page.formForm1.object
textblock = p.FindAllChildren("SlFullClassName","System.Windows.Controls.TextBlock",1)
if UBound(textblock) >= 0 Then
For i = 0 To UBound(textblock)
Log.Message("Text: " & textblock(i).Text)
Next
Else
Log.Error("No TextBlock found.")
End If
end sub
How can I solve this issue?
Any suggestion/help will be greatly appreciated
Many Thanks
Aazim