火狐崩溃当我运行硒单元测试 [英] Firefox crash when I run selenium unit test

查看:293
本文介绍了火狐崩溃当我运行硒单元测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始使用Selenium.WebDriver(v2.45)运行视力测试。



随着网络驱动器我用 FirefoxDriver 。我已经安装了Firefox 38,当我尝试运行测试Firefox的回报异常与消息:




FF已停止工作。




有没有人有什么建议? ?它曾在此前一周,是有可能,我的测试是通过更新崩溃

 问题签名:
问题事件名称:APPCRASH
应用名称:Firefox.exe
应用程序版本:38.0.1.5611
应用时间戳:55540a1a
故障模块名称:xul.dll
故障模块版本: 38.0.1.5611
故障模块时间戳:55541969
异常代码:C0000005
异常偏移:0035669b
OS版本:6.3.9600.2.0.0.16.7
区域设置ID:1033
其他信息1:5861
其他信息2:5861822e1919d7c014bbb064c64908b2
附加信息3:a10f
附加信息4:a10ff7d2bb2516fdc753f9c34fc3b069

有是我的测试方法体:

  [事实] 
酒店的公共空间ShouldLoginForTestAccount()
{
变种司机=新FirefoxDriver();
driver.Manage()Cookies.DeleteAllCookies();
driver.Navigate()GoToUrl(LoginPage)。

driver.FindElementById(登录)
.SendKeys(correctLogin);
driver.FindElementById(密码)
.SendKeys(correctPassword);

driver.FindElementByTagName(按钮)
。点击();

Assert.Equal(TestingProjectUrl,driver.Url);

driver.Close();
}


解决方案

硒2.45不正常与Firefox 38由于兼容性问题。



降级Firefox以35 的(的链接到35.0.1 )。


I start use Selenium.WebDriver (v2.45) to run visual tests.

As web driver I use FirefoxDriver. I have installed Firefox 38. When I try run test firefox return exception with message:

FF has stopped working.

Does anyone have any suggestions? It worked in previous week, is it possible that my test was crashed by updated?

Problem signature:
  Problem Event Name:   APPCRASH
  Application Name: Firefox.exe
  Application Version:  38.0.1.5611
  Application Timestamp:    55540a1a
  Fault Module Name:    xul.dll
  Fault Module Version: 38.0.1.5611
  Fault Module Timestamp:   55541969
  Exception Code:   c0000005
  Exception Offset: 0035669b
  OS Version:   6.3.9600.2.0.0.16.7
  Locale ID:    1033
  Additional Information 1: 5861
  Additional Information 2: 5861822e1919d7c014bbb064c64908b2
  Additional Information 3: a10f
  Additional Information 4: a10ff7d2bb2516fdc753f9c34fc3b069

There is my test method body:

[Fact]
public void ShouldLoginForTestAccount()
{
    var driver = new FirefoxDriver();
    driver.Manage().Cookies.DeleteAllCookies();
    driver.Navigate().GoToUrl(LoginPage);

    driver.FindElementById("Login")
        .SendKeys("correctLogin");
    driver.FindElementById("Password")
        .SendKeys("correctPassword");

    driver.FindElementByTagName("button")
        .Click();

    Assert.Equal(TestingProjectUrl, driver.Url);

    driver.Close();
}

解决方案

Selenium 2.45 does not reliably work with Firefox 38 due to compatibility issues.

Downgrade Firefox to 35 (link to 35.0.1).

这篇关于火狐崩溃当我运行硒单元测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆