【发布时间】:2021-08-13 21:56:07
【问题描述】:
我想用 selenium 从 Firefox 获取网络信息。我是用chrome驱动做的,像这样
logPrefs.enable( LogType.PERFORMANCE, Level.ALL );
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.setCapability("goog:loggingPrefs", logPrefs);
chromeOptions.setCapability(CapabilityType.LOGGING_PREFS, logPrefs);
#and it is log code,
LogEntries logs = driver.manage().logs().get("performance");
我可以使用此代码获取网络日志和端点。我怎样才能从 Firefox 获得它?当我尝试它时,它给它一个错误。
Caused by: org.openqa.selenium.json.JsonException: Unable to determine type from: H. Last 1 characters read: H
谢谢
【问题讨论】:
标签: java selenium firefox geckodriver