Skip to content

[🐛 Bug]: Console logs returned as zero using RemoteDriver (SeleniumGrid) .NET Selenium  #14545

@sponnusamyneogov

Description

@sponnusamyneogov

What happened?

This code is not functioning correctly when using RemoteWebDriver with Selenium Grid.

[Test]
public void ConsoleLogsGridRun()
{
var options = new ChromeOptions();
options.SetLoggingPreference(LogType.Browser, OpenQA.Selenium.LogLevel.All);
var Driver = new RemoteWebDriver(
new Uri("http://10.0.0.37:8888/"),
new RemoteSessionSettings(options), TimeSpan.FromSeconds(100));
Driver.Url = "https://www.selenium.dev/selenium/web/bidi/logEntryAdded.html";

Driver.FindElement(By.Id("consoleLog")).Click();
Driver.FindElement(By.Id("consoleError")).Click();

var jsErrors = Driver.Manage().Logs.GetLog(LogType.Browser);
}

Please advise

How can we reproduce the issue?

[Test]
public void ConsoleLogsGridRun()
{
var options = new ChromeOptions();
options.SetLoggingPreference(LogType.Browser, OpenQA.Selenium.LogLevel.All);
var Driver = new RemoteWebDriver(
new Uri("http://10.0.0.37:8888/"),
new RemoteSessionSettings(options), TimeSpan.FromSeconds(100));
Driver.Url = "https://www.selenium.dev/selenium/web/bidi/logEntryAdded.html";

Driver.FindElement(By.Id("consoleLog")).Click();
Driver.FindElement(By.Id("consoleError")).Click();

var jsErrors = Driver.Manage().Logs.GetLog(LogType.Browser);
}

Relevant log output

jsErrors returned as null

Operating System

Windows 10

Selenium version

Selenium Version 4.25.0

What are the browser(s) and version(s) where you see this issue?

Chrome

What are the browser driver(s) and version(s) where you see this issue?

129.0.6668.71

Are you using Selenium Grid?

Selenium Grid 4.25.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-dotnet.NET BindingsI-defectSomething is not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions