2012-08-23 52 views
-2

我对所有这些都很陌生,并且设置它已经有点压倒性了。我正在使用ant来运行一系列使用testng套件的测试。Selenium和Spring无法调用@Configuration方法

它得到的地方,我收到此错误点:

[testng] Failed to invoke @Configuration method org.springframework.test.context.testng.AbstractTestNGSpringContextTests.springTestContextPrepareTestInstance:Error creating bean with name 'com.mystuffs.tests1.CreateTest1': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void com.mystuffs.web.BrowserTest1.setBrowser(com.mystuffs.web.browser.Browser); nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'browser' defined in class path resource [applicationcontext.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Could not start Selenium session: Failed to start new browser session: Error while launching browser

它看起来像某种依赖的问题,但我不知道如何着手。任何建议表示赞赏!

+0

如果你给我们你的蚂蚁代码,它会帮助我们。 – Greg

回答

0

什么都尝试:问题是你试图实例化一个硒浏览器会话,同时启动您的应用程序,这failes:

java.lang.RuntimeException: Could not start Selenium session: Failed to start new browser session: Error while launching browser

所以,你应该看看为什么硒无法启动浏览器