Hi.
I'm trying to automatically turn off JavaScript (project requirement) when running Selenium WebDriver tests using the C# bindings.
I'm using Selenium 4 so there is no longer any DesiredCapability classes/methods that I can use e.g. I can no longer do the following:
ChromeOptions.AddAdditionalCapability("profile.managed_default_content_settings.javascript", 2);
Also, the following throws an unrecognised argument exception.
ChromeOptions.AddArguments("
--disable-javascript ");
Seems like Java and Python Selenium bindings might still provide the relevant classes/methods to auto turn off JavaScript but not C#.
Can anyone help with this please - it has to be a C# solution?
Thanks,
Karl.