Forum Discussion

Test56's avatar
Test56
Contributor
10 years ago

Getting ChildCount as 0 when using DOM model

Hey,



I am using Test Complete for testing HTML element. I am trying to retrieve web object using DOM model. Unfortunately the ChildCount property is returning me 0 . However when i try to spy the same object using Tree model it returns me a count of 20 . Can you please help me me on this ?

4 Replies

  • Hey Tanya,



    I am not sure how the code will matter here. I was trying to spy using your SpyTool and found the issue. However i have updated my project property for Web Testing where i am using Tree model to DOM instead of Tree or Hybrid.
  • Any suggestions or setting to overcome this issue ?
  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)
    Hi Rajat,

     


    TestComplete presents the object tree in different structures when switching between models. So, it may be expected that the ChildCount property of the object has different values as the type of the object could change. 


     


    Are you planning to execute cross-browser testing? If you are, you will need to use the Tree model. Other models don't support this. Please refer to the "Cross-Browser Testing - Overview" article for details.