Java.lang.IllegalAccessError: tried to access class org.openqa.selenium.os.ExecutableFinder from class org.openqa.selenium.firefox.FirefoxBinary我一直在试图运行itelliJ硒基本测试,我收到以下错误
at org.openqa.selenium.firefox.FirefoxBinary.locateFirefoxBinariesFromPlatform(FirefoxBinary.java:433) at org.openqa.selenium.firefox.FirefoxBinary.(FirefoxBinary.java:108) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:122) at com.masteringselenium.BasicTest.googleExampleThatSearchesFor(BasicTest.java:21) at com.masteringselenium.BasicTest.googleCheeseExample(BasicTest.java:43) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80) at org.testng.internal.Invoker.invokeMethod(Invoker.java:714) at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901) at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111) at org.testng.TestRunner.privateRun(TestRunner.java:767) at org.testng.TestRunner.run(TestRunner.java:617) at org.testng.SuiteRunner.runTest(SuiteRunner.java:334) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291) at org.testng.SuiteRunner.run(SuiteRunner.java:240) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1198) at org.testng.TestNG.runSuitesLocally(TestNG.java:1123) at org.testng.TestNG.run(TestNG.java:1031) at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:72) at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:124) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
0
A
回答
0
根据您正在运行的是什么版本的硒,你可以实例Firefox的驱动程序时,需要指定Firefox的二进制文件的路径。例如使用Selenium 2.53.1看起来是这样的:
FirefoxBinary ffBinary = new FirefoxBinary(new File("path to your firefox.exe"));
FirefoxProfile ffProfile = new FirefoxProfile();
driver = new FirefoxDriver(ffBinary,ffProfile);
相关问题
- 1. 我正在尝试运行我的应用程序我收到以下错误:
- 2. 我们可以在GWT dev模式下运行硒测试吗?
- 3. 硒 - testRunner运行测试错误
- 4. 单元测试我有以下错误
- 5. 运行硒测试
- 6. 我们得到了以下错误:null,当试图运行这个SQL脚本
- 7. 我收到以下错误,当我试图牛逼Ø建立我的项目
- 8. 当我试图运行呈现以下错误消息
- 9. 我试图加载javascript文件到我的项目,但收到以下错误
- 10. 在Jenkins运行硒测试
- 11. 我收到以下错误,同时运行我的代码
- 12. 试图调试我的测试项目一直挂在“正在运行测试...”步骤
- 13. 我试图删除特定的记录,但我收到以下错误消息
- 14. 荫收到以下错误每次我尝试运行我的处理...附近有语法错误“END”
- 15. 虽然我试图更新我的表中的一行,但我收到以下错误:
- 16. 我创建了我的shell脚本,并试图访问NAS Mount目录中的数据。当我试图执行脚本我收到以下错误
- 17. Selenium RC测试:以JUnit测试运行时出错,在以JUnit测试时以无错误测试
- 18. 闪存错误#1010当我运行我的Flash文件(测试)在输出面板,我收到以下错误</p> <p>类型错误
- 19. 我试图运行autoencoder_layers.py使用基于GPU keras但我得到这个错误
- 20. 我试图运行文件程序,我得到错误FileNotFoundException
- 21. 硒测试不运行
- 22. 无法运行硒测试
- 23. 运行JUnit测试硒
- 24. 从aspx运行硒测试
- 25. 我收到以下错误,同时试图使用库函数fminunc在倍频
- 26. 在运行JUnit测试,收到错误java.lang.NoClassDefFoundError:org.apache.log4j.Priority
- 27. 在执行我的测试脚本后得到NullPointerException错误
- 28. 我收到以下错误:在install.packages
- 29. 我如何每5分钟运行一次硒测试?
- 30. 我无法在Play测试运行器上运行测试1.2.7
请阅读[问]并编辑问题,并用** clear **问题回答。 –