我正在使用JUnit
与Selenium Web Driver
进行一些Firefox
次测试。测试工作正常,但测试完成后(变化后的时间量)Firefox
退出工作,我得到一个“未处理的win32异常发生”错误。我为Firefox
设置了一个单独的个人资料,用于Selenium
Creating a Firefox profile for Selenium Tests。我用以下代码打开浏览器。
@BeforeClass
public static void loginToSearchPage() throws Exception {
profile = new ProfilesIni();
ffprofile = profile.getProfile("Selenium");
driver = new FirefoxDriver(new FirefoxBinary(new File("C:\\Users\\pondek\\AppData\\Local\\Mozilla Firefox\\firefox.exe")), ffprofile);
//Open the URL in firefox browser
driver.get("https://nrijctdu0055710:9449/llr/welcome.action");
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
(new Thread(new LoginWindow())).start();
driver.findElement(By.linkText("Login")).click();
}
任何有关正在发生的事情的想法都会受到赞赏。