我在HTML單元的幫助下測試論壇PhpBB。我想在PhpBB論壇的主題之一添加消息。我在textarea中輸入消息並單擊提交按鈕,但新頁面沒有我的消息。什麼似乎是問題? final ArrayList<HtmlForm> formList=(ArrayList<HtmlForm>) page.getByXPath("//form[@id='postform']");
final HtmlText
的非常簡單的例子,從該的HtmlUnit網站不是編譯Java中: final WebClient webClient = new WebClient();
final HtmlPage page = webClient.getPage("http://htmlunit.sourceforge.net");
我得到的頁面變量的錯誤:類型不匹配:不能從頁面轉換爲HtmlPage。我不明白爲什麼會
我一直在使用HTMLUnit。它很適合我的要求。但它似乎非常緩慢。 例如:我已經使用自動化的HtmlUnit以下情形 Goto Google page
Enter some text
Click on the search button
Get the title of the results page
Click on the first result.
代碼: long t1=Sy