私はセレン-javaのではなく、数行、私は次のようなエラーになってるのショートプログラムで私の最初のプログラムを書くためにしようとしている:「メイン」スレッドで入手ないIllegalAccessError警告
例外java.lang.IllegalAccessErrorを:org.openqa.selenium.os.ExecutableFinderクラスorg.openqa.selenium.firefox.FirefoxBinaryからアクセスしようとしました at org.openqa.selenium.firefox.FirefoxBinary.locateFirefoxBinariesFromPlatform(FirefoxBinary.java:418) at org.openqa .selenium.firefox.FirefoxBinary(FirefoxBinary.java:108) at java.util.Optional.orElseGet(不明なソース) at org.openqa.selenium.firefox.FirefoxDriver.toExecutor(FirefoxDriver.java:204)(FirefoxDriver.java:108) 、org.openqa.selenium.firefox.FirefoxDriver(FirefoxDriver.java:104) at com.packt.selenium.chapter1.NavigateToAUrl。メイン(NavigateToAUrl.java:12)
私のコードは次のとおりです。
package com.packt.selenium.chapter1;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class NavigateToAUrl
{
public static void main(String[] args)
{
WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.com");
}
}
ご返信ありがとうございます。私はセレン3.4を持っています。0&Mozilla Firefox 53.x.私はgeckodriver v0.16.1で試しましたが、それでも同じ問題が発生しています。 – Punk23
@ Punk23更新されたコードとエラースタックトレースで質問を更新できますか? – DebanjanB