使用Selenium Web Driver运行JUnit测试后Firefox崩溃

时间:2016-07-29 19:30:03

标签: selenium firefox junit

我正在使用JUnitSelenium 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();

}

任何有关正在发生的事情的想法都会受到赞赏。

0 个答案:

没有答案