Forum Discussion

stapleshome7's avatar
stapleshome7
New Contributor
11 years ago

HTML parsing

I am trying to retrieve information from HTML string (i.e. parsing html string) but, I can't find any examples anywhere, all I can see are the XML examples which dont work for HTML.

 

Situation= I have a HTML file from which i need to extract the HTML string and parse it to extract information like color, heading etc etc. 

I am new to test complete and I'm trying to play around with different assemblies not nothing is working out for me!

9 Replies

    • gc_com's avatar
      gc_com
      Occasional Contributor

      Hi Tanya,

       

      I have a similar problem (i.e. trying to parse a string made of HTML code), but I'm using the Desktop module of Test Complete. The two articles seem to refer to objects available only in the Web module. Can you confirm? If so, is there a way to parse HTML code using objects from the Desktop module?

       

      Note: I'm automating tests on a Java application. The HTML data I'm trying to parse is simply displayed in a pane, not a browser.

       

      Thanks!

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        HTML is basically a form of XML.  You could create an instance of MSXML2.DOMDocument, feed your HTML string into that and parse it using the native node methods built into that object.