0
我们正在尝试将我们的系统从Selenium 1迁移到WebDriver。 尽管Hudson从站出现错误消息,但测试在eclipse中正常运行。在Hudson从站上运行Webdriver测试之前出现错误
环境:
- 哈德森高手:Linux机器
- 哈德森奴:Windows 7中,86
Java版本:1.7.0_03
系统: 为此任务设立了一项新的哈德森工作配置与Selenium 1测试套件相同。作业从build.xml文件执行目标。干净,makedir和编译目标成功运行。 上执行的测试下面的错误消息上哈德森控制台出现:
run_shopping_travel_tests:
[junit] Running com.example.tests.ExampleTests
[junit] Tests run: 1, Failures: 0, Errors: 2, Time elapsed: 2.385 sec
[junit] Test com.example.tests.ExampleTests FAILED
[junit] Running com.example.tests.Example2Test
[junit] Tests run: 1, Failures: 0, Errors: 2, Time elapsed: 0.752 sec
[junit] Test com.example.tests.Example2Test FAILED
[echo] selenium directory: C:\Selenium
错误:
错误消息
LINUX
Stacktrace
java.lang.NoSuchFieldError: LINUX
at org.openqa.selenium.firefox.FirefoxBinary.isOnLinux(FirefoxBinary.java:62)
at org.openqa.selenium.firefox.FirefoxBinary.startProfile(FirefoxBinary.java:72)
at org.openqa.selenium.firefox.FirefoxBinary.clean(FirefoxBinary.java:273)
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:78)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:142)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:85)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:121)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:77)
at com.example.tests.ExampleTests.setup(ExampleTests.java:43)
用于测试的Java代码:
public class ExampleTests
{
FirefoxDriver driver = null;
@Before
public void setup() {
File profileDir = new File("C:\\Selenium\\FirefoxProfile");
FirefoxProfile profile = new FirefoxProfile(profileDir);
driver = new FirefoxDriver(profile); // line 43, where error appears
}
@Test
public void T100_VerifyExampleTest() {
// some test code here
}
}
我们试图在没有“配置文件”和相同的错误混乱的情况下运行测试年龄出现了。
在此先感谢。