Forum Discussion

Mathit's avatar
Mathit
Contributor
6 years ago

How to retrieve values from HTML Table using DOM

I have a table as attached and I want to retrieve values of columns using DOM.  

Please suggest

14 Replies

    • Mathit's avatar
      Mathit
      Contributor

      When i do a spy, it shows as a table that takes much longer to retrieve the column valuesfor some reason.

       

      Aliases.browser.Page("*").Panel(0).Panel(0).Panel(0).Section("content").Panel(1).Panel("applicantForm").Panel(0).Form("Application").Panel(0).Panel(0).Panel(5).Panel(0).Panel(0).Panel(1).Panel("coverageSummary").Panel(0).Panel(1).Table("pdTable")

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        It shouldn't take that long.  TestComplete reads the DOM and translates it into objects.

        Based upon the Alias you have presented, there are alot of components, including the page, that are not included in any sort of mapping..  Generally, once you obtain the table, you then can retrieve the contents of the cells by referencing the cell by row and column index.