I am trying to use this devtools protcol command: Page.AddScriptToEvaluateOnNewDocument
.
It seems that this protocol command is not fully implemented in the c# version of selenium. I also tried the click event too, but this didn't work as well. However, I was able to use one devtools command, a networking one with the code:
IDevTools devTools = driver as IDevTools;
DevToolsSession session = devTools.CreateDevToolsSession();
session.Network.Enable(new OpenQA.Selenium.DevTools.Network.EnableCommandSettings());
session.Network.SetBlockedURLs(new OpenQA.Selenium.DevTools.Network.SetBlockedURLsCommandSettings()
{
Urls = new string[] { "favicon" }
});
Is there something I can do to fix this myself?
References:
https://github.com/SeleniumHQ/selenium/issues/8000