我在Selenium Webdriver代码中收到错误消息

San*_*eep -3 selenium-webdriver

错误信息

8月01,2014 5:07:52 PM org.openqa.selenium.os.UnixProcess $ SeleniumWatchDog destroyHarder INFO:命令无法完全关闭.强行摧毁(v2).org.openqa.selenium.os.UnixProcess$SeleniumWatchDog@169751d

码:

public void login(){
    WebElement loginBtn;
    loginBtn= driver.findElement(By.className("cr-btn"));
    //loginBtn.click();
Run Code Online (Sandbox Code Playgroud)

小智 5

这是一个Firefox插件问题.我用Google搜索了3个小时,找到了解决方案!

要解决它,你必须关闭@After部分中的驱动程序:

    @After             
    public void Ending() {    
            try{    
              driver.close();
              Thread.sleep(3000);
               }
           catch(Exception b){
              b.getMessage();
               }
     }
Run Code Online (Sandbox Code Playgroud)

祝好运!