From: Ahmed A. <asa...@ya...> - 2015-11-16 09:38:09
|
Hi Teryl, HTMLElement and descendants are part of the JavaScript objects, and they have their DomNode assigned. DomNode is a parallel hierarchy where it handles the relation between elements. You can use htmlPage.addDomChangeListener. Also, you could post your code so far, so others can continue from where you have reached. Ahmed From: tptaylor <ter...@gm...> To: htm...@li... Sent: Sunday, November 15, 2015 12:02 AM Subject: Re: [Htmlunit-user] Question about scraping object/embed tags from website Hi Ahmed, How are HTMLObjectElement, and HtmlObject linked? I have verified that an HTMLObjectElement object is created by the Javascript and it is added to the document object, as when I check it's ownerDocument, it is the root URL given above. I also add a WebWindowListener to the WebClient. The WebListener is fired multiple times, but not when the HTMLObjectElement is added, and the HtmlObject doesn't appear in the HtmlPage object. I was thinking of adding in a DOMListener to try and see if that is triggered when the dom is changed, but I'm not sure where I would do that. Is that something you do directly after getPage is called on HtmlPage? Cheers, Teryl |