51Testing软件测试论坛

标题: selenium初学者,用ChromeDriverManager.getInstance().setup(); 打不开浏览器,困... [打印本页]

作者: lina.z    时间: 2016-11-17 15:18
标题: selenium初学者,用ChromeDriverManager.getInstance().setup(); 打不开浏览器,困...
TestNGproject,
import io.github.bonigarcia.wdm.ChromeDriverManager;
public void precondition() {
        ChromeDriverManager.getInstance().setup();
报错如下:
[Utils] Attempting to create C:\workpace\FirstTestNGProject\test-output\Default suite\Default test.xml
[Utils]   Directory C:\workpace\FirstTestNGProject\test-output\Default suite exists: true
FAILED CONFIGURATION: @BeforeTest precondition
java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
在网上查了很多资料,说是加slf4j-api.jar 和 slf4j-loj4j12.jar,加完之后还是报错
如下:
Failed to instantiate SLF4J LoggerFactory
Reported exception:
java.lang.NoClassDefFoundError: org/apache/log4j/Level
求大神帮忙看一下,万分感谢

作者: lina.z    时间: 2016-11-17 15:32
不要沉 自己顶一下




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2