I am trying to use QWebpage to parse the data from http://www.wizards.com/dndinsider/co...r.aspx?id=3528. If the user isn't currently logged into the site it will redirect the user to a login page. If the user is redirected to the login page I want to automatically login. When I use the evaluateJavaScript call to fill in the email and password text boxes and submit the form it seems to fail to continue to the desired page. I have attached the test application I put together. Does anyone have any ideas why it wouldn't be working? The code to fill in the form and submit is the following:
Qt Code:
void Widget::on_ui_pushButtonLoad_clicked() { QWebFrame *frame = webView->page()->mainFrame(); frame->evaluateJavaScript( arg( ui_lineEditName->text() ) ); frame->evaluateJavaScript( arg( ui_lineEditPassword->text() ) ); } void Widget::on_ui_pushButtonSubmit_clicked() { QWebFrame *frame = webView->page()->mainFrame(); frame->evaluateJavaScript( "document.forms[0].submit();" ); }To copy to clipboard, switch view to plain text mode
Thanks for the help.
Bookmarks