2017-02-21 124 views
-1

我开发的火狐,Chrome,IE浏览器...运行Selenium测试虽然测试完美通过对Chrome和IE浏览器的网站,我有使用Mozilla Firefox如下问题:硒错误0x80000003与Firefox

error 0x80000003

这出现在驱动程序关闭Firefox窗口的运行结束时。

我在互联网上做了一些研究,但大多数答案都相当老旧,并且将firefox降级到它的48.0版本,并且它已被v50等更高版本修复。它与V48工作,但我使用的V51,仍然有同样的问题...

这里的驱动程序代码:

package Driver.Firefox; 

import Driver.Driver; 
import org.apache.commons.lang3.SystemUtils; 
import org.openqa.selenium.WebDriver; 
import org.testng.Assert; 

public class FirefoxDriver extends Driver { 
    public FirefoxDriver(){ 
     if (SystemUtils.IS_OS_WINDOWS) { 
      System.setProperty("webdriver.gecko.driver", this.basePath + "/src/test/java/Driver/Firefox/geckodriver-win64.exe"); 
     } 
     else if (SystemUtils.IS_OS_LINUX) { 
      System.setProperty("webdriver.gecko.driver", this.basePath + "/src/test/java/Driver/Firefox/geckodriver-linux"); 
     } 
     else if (SystemUtils.IS_OS_MAC) { 
      System.setProperty("webdriver.gecko.driver", this.basePath + "/src/test/java/Driver/Firefox/geckodriver-macos"); 
     } 
     else { 
      Assert.assertTrue(false, "This platform is not supported for the moment."); 
     } 
     driver = new org.openqa.selenium.firefox.FirefoxDriver(); 
     driver.manage().window().maximize(); 

    } 
} 
+0

我也有这个问题,并couldn”解决它,当使用FF47一切正常。这不是一个很好的解决方案,但它的工作原理。 – acikojevic

+0

可能是Selenium兼容性问题, 这个组合工程 Firefox 51.0.1 Selenium 3.0.1 壁虎0.10.0 –

+0

其实它可能是一个操作系统的问题...我有这个问题在Windows 8.1上,我的一个同事们也对8.1有同样的问题。但是一个在7上运行它的同事没有这个问题......我们三个拥有完全相同的Firefox,Selenium和Gecko版本。 – Papple

回答

0

这似乎是一个兼容性问题。请尝试最新的gecko driver

+0

这是我正在使用的那个... – Papple

+0

谢谢,这似乎已经解决了问题! – Papple

0

好了,所以它看起来像它的固定...我只是降级为V48,然后安装最新版本(我已经有)和问题消失了......