| Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date | |
| All threads index page 1 | |
Now that WebKit is part of Qt, how can I get my hands on the DOM for a given html document loaded in a QWebPage? The api seems doesn't seem to go deeper to provide a pointer to the page DOM hierarchy. My final goal is to automate some web tasks, load a page, set some input values, post etc. Thanks -- [ signature omitted ]
B.C. wrote: >Now that WebKit is part of Qt, how can I get my hands on the DOM for a > given html document loaded in a QWebPage? The api seems doesn't seem > to go deeper to provide a pointer to the page DOM hierarchy. No, you can't do that yet. The DOM API was left out of Qt 4.4. Right now, QtWebKit allows you to display HTML pages and run the JavaScripts contained in it. Plugin support is something for the future, as is allowing some more interaction with the page's contents. Note you can automate some tasks by executing JavaScript excerpts. >My final goal is to automate some web tasks, load a page, set some input >values, post etc. Why do you need an HTML page for that? Post the values directly to the server. -- [ signature omitted ]
Attachment:
signature.asc
Description: This is a digitally signed message part.
>Why do you need an HTML page for that? Post the values directly to the server. I was actually looking for something similar to httpunit: http://httpunit.sourceforge.net/ which is written in Java. Basically it allows you to navigate to a page, set the input values and then call the submit method of htmlform object which it creates when you load a page (it parses the page and it creates all these DOM objects). The HtmlForm object will take care of building the POST query string from all the input, select etc. values. I don't have to do it. This is why I would rather use something like that and not build the string myself. Unfortunatelly there is no equivalent for httpunit in the c++ world - or I should say there are bits here and there - parts of the opensource browsers - but one has to dig into the code etc. It is not as simple as it is with the java library. "Thiago Macieira" <thiago.macieira@xxxxxxxxxxxxx> wrote in message news:200805041039.37463.thiago.macieira@xxxxxxxxxxxxxxxx -- [ signature omitted ]
On Sunday 04 May 2008 03:05:30 B.C. wrote: > My final goal is to automate some web tasks, load a page, set some input > values, post etc. Automating websites is easy with Tidy and QtXml. Poke me if you need some example code. -- [ signature omitted ]