From: Ahmed A. <asa...@ya...> - 2014-02-05 10:54:51
|
Hi, TextPage doesn't process HTML/JavaScript/DOM/etc. TextPage is just plain text. And since you are expecting it to be HtmlPage, where you can .click()/find element/querySelector()/etc, you need to provide the actual page, so we compare the content type and see how HtmlUnit handles it comparing to real browsers. Ahmed ________________________________ From: Sreenadh VP <sre...@co...> To: smk smk <ste...@gm...> Cc: htm...@li...; Ahmed Ashour <asa...@ya...> Sent: Wednesday, February 5, 2014 1:50 PM Subject: Re: [Htmlunit-user] java.lang.ClassCastException: com.gargoylesoftware.htmlunit.TextPage cannot be cast to com.gargoylesoftware.htmlunit.html.HtmlPage hanks you so much for advising. As its navigational flow , need to do query selector for for getting element to click or inputting the values. If we assigned to type of TextPage or Page , not able to do query selector with methods "page.querySelectorAll", for same we need type HtmlPage at the end in the navigational clicks or submission. How can we achieve this, please advice. Sreenadh |