Team System Developer Center > Visual Studio Team System Forums > Visual Studio Team System 2010 Beta2 > Get all objects in a web page to UITestControlCollection
Ask a questionAsk a question
 

Proposed AnswerGet all objects in a web page to UITestControlCollection

  • Monday, November 02, 2009 8:45 AMFAM007 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hi,

    I was evaluating the VSTS2010 Coded UI test feature. I would like to know if it is possible to get all the objects present in a page to UITestControlCollection.I mean to say the links, Editboxes, buttons, etc to one UITestControlCollection

    Thank You,
    FAM

All Replies

  • Monday, November 02, 2009 9:16 AMGautam Goenka [MSFT] Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Proposed Answer
    You can use GetChildren() recursively on the root HTML document to get all the descendants.  However, this could be perf intensive operation.

    What is your scenario? Why do you want to do this?

    Thanks,
    Gautam