I want to use KHTML to parse the document, find the desired forms (later also different DOM elements and attributes, because I want to import data from websites into my program), fill in values and submit these values (for example automatic login). I don't need to display pages, I only want it to input data into my program.
THANK YOU VERY MUCH! I didn't recognize that signal but connecting it to the appropriate slot works as requested ) Now, the next question is how to input data into forms using khtml functions (for example username/password input forms): Source code 1 2 3 4 DOM::HTMLDocument document = browser->htmlDocument(); DOM::HTMLCollection forms = document.forms(); DOM::Node useridNode = forms.namedItem("userid"); DOM::Node passNode = forms.namedItem("pass"); Is HTMLInputElement the right starting point?
Well, OK Thanks for your answer! But how can I accomplish that? Just inserting a sleep(10) can't be a good solution and this also doesn't work: I get no output of the page title... I wasn't able to find a signal which says "page loading finished" or something like that...
Well... at least I receive the cookies because I see a cookie dialog to select whether they should be saved or not. Anything else that could be wrong? What about the code, should it work in your opinion?
Hi everybody, I want to open a webpage with a KHTMLPart, fill in predefined values in a form and I also want to be able parse the document structure to select some tags/values. As a first step I tried to just open an URL and print out the title of the page. Unfortunately my code doesn't work and I wasn't able to find a solution or tutorial on this topic. Can anybody help me? Thanks in advance! Source code 1 2 3 4 5 6 KURL url = "http://www.google.de"; browser = new KHTMLPart(); browser->openURL(...