I am able to get logs form Chrome and MS Edge drivers using options in selenium 4.0 but same code is not working for Gecko Driver (Firefox).
I am suing C# as scripting language.
Below is code I am using for Chrome :
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.SetLoggingPreference(LogType.Performance, LogLevel.All);
IWebDriver driver = new ChromeDriver(chromeOptions);
driver.Navigate().GoToUrl("{My Application URL}");
IWebElement ElementToClick = driver.FindElement(By.XPath({XPath of Element}));
ElementToClick.Click();
List<LogEntry> primaryLogs = driver.Manage().Logs.GetLog(LogType.Performance);
Below is code I am using for Gecko Driver which is not returning any value in primaryLogs :
FirefoxOptions firefoxOptions = new FirefoxOptions();
firefoxOptions.SetLoggingPreference(LogType.Performance, LogLevel.All);
IWebDriver driver = new FirefoxDriver(firefoxOptions);
driver.Navigate().GoToUrl("{My Application URL}");
IWebElement ElementToClick = driver.FindElement(By.XPath({XPath of Element}));
ElementToClick.Click();
List<LogEntry> primaryLogs = driver.Manage().Logs.GetLog(LogType.Performance);
Appreciate help on this.