为什么WebDriver输出此html异常

为什么WebDriver输出此html异常,webdriver,Webdriver,代码: package com.funcybernation.yndextesting; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.htmlunit.HtmlUnitDriver; /** * Hello world! * */ public class App

代码:

package com.funcybernation.yndextesting;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.htmlunit.HtmlUnitDriver;

/**
 * Hello world!
 *
 */
public class App {

    public static void main(String[] args) {

        // Create a new instance of the html unit driver
        // Notice that the remainder of the code relies on the interface, 
        // not the implementation.
        WebDriver driver = new HtmlUnitDriver();

        // And now use this to visit Google
        driver.get("http://www.google.com");

        // Find the text input element by its name
        WebElement element = driver.findElement(By.name("q"));

        // Enter something to search for
        element.sendKeys("Cheese!");

        // Now submit the form. WebDriver will find the form for us from the element
        element.submit();

        // Check the title of the page
        System.out.println("Page title is: " + driver.getTitle());
    }
}
输出=====

HtmlTextInput[<input autocomplete="off" class="lst tiah" value="" title="Пошук Google" maxlength="2048" name="q" size="57" style="color:#000;margin:0;padding:5px 8px 0 6px;vertical-align:top;padding-right:38px" type="text">] -> HtmlHtml[<html itemscope="itemscope" itemtype="http://schema.org/WebPage">]
HtmlTextInput[<input autocomplete="off" class="lst tiah" value="" title="Пошук Google" maxlength="2048" name="q" size="57" style="color:#000;margin:0;padding:5px 8px 0 6px;vertical-align:top;padding-right:38px" type="text">] -> HtmlHtml[<html itemscope="itemscope" itemtype="http://schema.org/WebPage">]
HtmlTextInput[<input autocomplete="off" class="lst tiah" value="" title="Пошук Google" maxlength="2048" name="q" size="57" style="color:#000;margin:0;padding:5px 8px 0 6px;vertical-align:top;padding-right:38px" type="text">] -> HtmlHtml[<html itemscope="itemscope" itemtype="http://schema.org/WebPage">]
HtmlBody[<body bgcolor="#fff">] -> HtmlHtml[<html itemscope="itemscope" itemtype="http://schema.org/WebPage">]
HtmlTextInput[<input autocomplete="off" class="lst tiah" value="" title="Пошук Google" maxlength="2048" name="q" size="57" style="color:#000;margin:0;padding:5px 8px 0 6px;vertical-align:top;padding-right:38px" type="text">] -> HtmlHtml[<html itemscope="itemscope" itemtype="http://schema.org/WebPage">]
HtmlTextInput[<input autocomplete="off" class="lst tiah" value="Cheese!" title="Пошук Google" maxlength="2048" name="q" size="57" style="color:#000;margin:0;padding:5px 8px 0 6px;vertical-align:top;padding-right:38px" type="text">] -> HtmlHtml[<html itemscope="itemscope" itemtype="http://schema.org/WebPage">]
    Page title is: Cheese! - Search Google
HtmlTextInput[]->HtmlHtml[]
HtmlTextInput[]->HtmlHtml[]
HtmlTextInput[]->HtmlHtml[]
HtmlBody[]->HtmlHtml[]
HtmlTextInput[]->HtmlHtml[]
HtmlTextInput[]->HtmlHtml[]
页面标题是:奶酪搜索谷歌

日志信息可能来自HtmlUnit。如果是这样,您应该能够。

问题出在哪里?最后一句话说,你得到了你想要的。其余的将只是标准的信息日志给你,让你知道它正在做的事情…我只想看到我的输出没有任何日志或html。这是一个问题。我怎样才能关闭这个日志?