【发布时间】:2011-12-18 08:47:30
【问题描述】:
我正在尝试使用 NUnit 和 Selenium 2 在 C# 中运行一些测试。我遵循的步骤:
- 我安装了 NUnit。我想我在这里不能有任何错误。
- 我下载了 Selenium 2:我从 this 链接获得了客户端,从 this 获得了 C# 服务器。
-
执行以下命令启动 selenium 服务器:(我现在怀疑这一步是否必要)
java -jar C:\selenium-remote-control-2.11.0\selenium-server-2.11.0\selenium-2.11.0\selenium-server-standalone-2.11.0.jar
当 - 使用 NUnit- 我运行一个使用 FirefoxDriver 实例的简单谷歌测试时,出现此错误:
SeleniumTests.Test (TestFixtureSetUp):
SetUp : System.ComponentModel.Win32Exception : The system cannot find the file specified
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at OpenQA.Selenium.Firefox.Internal.Executable.LocateFirefoxBinaryFromPlatform() in c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Firefox\Internal\Executable.cs:line 197
at OpenQA.Selenium.Firefox.Internal.Executable..ctor(String userSpecifiedBinaryPath) in c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Firefox\Internal\Executable.cs:line 36
at OpenQA.Selenium.Firefox.FirefoxBinary..ctor(String pathToFirefoxBinary) in c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Firefox\FirefoxBinary.cs:line 66
at OpenQA.Selenium.Firefox.FirefoxDriver..ctor() in c:\Projects\WebDriver\trunk\dotnet\src\WebDriver\Firefox\FirefoxDriver.cs:line 114
at SeleniumTests.Test.FixtureSetup() in c:\users\julio\documents\visual studio 2010\Projects\UnitTestingElSuperDT\UnitTestingElSuperDT\Test.cs:line 18
这快把我逼疯了!!有什么帮助吗?
【问题讨论】:
标签: unit-testing selenium nunit