Click here to Skip to main content
15,070,233 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.

ChromeOptions options=new ChromeOptions();
ChromeDriver _driver=new ChromeDriver(options); //Stucking here in wpf project but it is wrking fine in Console project

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
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);
options.AddAdditionalCapability("useAutomationExtension", false);

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