我开发的火狐,Chrome,IE浏览器...运行Selenium测试虽然测试完美通过对Chrome和IE浏览器的网站,我有使用Mozilla Firefox如下问题:硒错误0x80000003与Firefox
这出现在驱动程序关闭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();
}
}
我也有这个问题,并couldn”解决它,当使用FF47一切正常。这不是一个很好的解决方案,但它的工作原理。 – acikojevic
可能是Selenium兼容性问题, 这个组合工程 Firefox 51.0.1 Selenium 3.0.1 壁虎0.10.0 –
其实它可能是一个操作系统的问题...我有这个问题在Windows 8.1上,我的一个同事们也对8.1有同样的问题。但是一个在7上运行它的同事没有这个问题......我们三个拥有完全相同的Firefox,Selenium和Gecko版本。 – Papple