From: smk s. <ste...@gm...> - 2014-02-05 11:00:03
|
Additionally what is the source code of the page that opens after the click? Can you provide also the url? Is it possible that after the click you are redirected to a .txt page? If yes then query selector cannot be applied at all. It has no meaning to text files. Stergios 2014-02-05 Ahmed Ashour <asa...@ya...>: > 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 > > > |