Forum Discussion

aazimurj's avatar
aazimurj
Occasional Contributor
11 years ago

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

2 Replies

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Aazim,


     


    I'm wondering what text is displayed in these text blocks in the other tool?


     

  • aazimurj's avatar
    aazimurj
    Occasional Contributor
    Hi Tanya,

          Sorry for late reply. Please see attached screenshot for the properties visible in SilverlightSpy for the textblock control.



    Because I am using free version of the tool, I do not see all the properties of control but if I switch to view pane on the tool, I can see the text of textblock control.



    Regards,

    Aazim