在eclipse中运行以下程序时,出现了一个错误:“无法找到Opera二进制”。
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.opera.OperaDriver;
import io.github.bonigarcia.wdm.WebDriverManager;
public class Opera
{
public static void main(String[] args)
{
WebDriverManager.operadriver().setup();
WebDriver d = new OperaDriver();
d.get("http://amazon.ae");
d.close();
}
}

如何解决这个问题,请帮助..。
发布于 2019-07-03 09:29:35
尝试指定Opera启动程序二进制文件的路径:
String operaBinary = "C:\\Program Files\\Opera\\launcher.exe"; // If Windows
WebDriverManager.operadriver().setup();
OperaOptions options = new OperaOptions();
options.setBinary(operaBinary);
WebDriver driver = new OperaDriver(options);
// ...https://stackoverflow.com/questions/56851934
复制相似问题