Click here to Skip to main content
15,884,472 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Trying to write automation scripts in wpf c# but not able to launch chrome and also it is not throwing any error, where as in console project, I am able to launch the chrome and also able to write scripts.


C#
ChromeOptions options=new ChromeOptions();
options.AddAdditionalCapability("useAutomationExtention",false);
options.AddArgument("--DNS-prefetch-disable");
ChromeDriver _driver=new ChromeDriver(options); //Stucking here in wpf project but it is wrking fine in Console project
_driver.Navigate().GoToUrl("https://www.google.co.in")


What I have tried:

Tried to find the exception but it is not throwing any exception, it is just getting stuck and not coming out from it
Posted
Updated 18-Mar-20 21:50pm

1 solution

It indeed throws an exception!
System.InvalidOperationException: 'invalid argument: cannot parse capability: chromeOptions
from invalid argument: unrecognized chrome option: useAutomationExtention

The cause is a typo.
Just replace
options.AddAdditionalCapability("useAutomationExtention", false);
by
options.AddAdditionalCapability("useAutomationExtension", false);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900