operachromiumdriver
operachromiumdriver copied to clipboard
Can no longer instantiate Opera driver with Selenium
A couple of weeks ago I started having trouble opening Opera with selenium.
The trouble started when I upgraded my local Opera to 80.0.4170.72, and my operadriver 94.0.4606.61. I have since upgraded again - I am now using Opera 81.0.4196.31, and operadriver 95.0.4638.54.
My instantiation looks like this in C#:
string operaExeLocation = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + @"\AppData\Local\Programs\Opera\81.0.4196.31\opera.exe";
OperaDriverService service = OperaDriverService.CreateDefaultService(@"C:\Opera", "operadriver.exe");
var operaOptions = new OperaOptions { BinaryLocation = operaExeLocation, LeaveBrowserRunning = false }; operaOptions.AddArgument("test-type"); operaOptions.AddExcludedArgument("enable-automation"); // operaOptions.AddAdditionalCapability("useAutomationExtension", false); //(this option does not seems to be supported any more)
IWebDriver driver= new OperaDriver(service, operaOptions);
Any ideas?
The error I am seeing when I try to instantiate is: "message": "session not created: Missing or invalid capabilities\n (Driver info: operadriver=95.0.4638.54"
According to this page: What Is New In Selenium 4 And What Is Deprecated In It?
The native support for Opera and PhantomJS is removed in Selenium 4, as their WebDriver implementations are no longer under development. The Opera browser is based on Chromium, and users looking to test their implementation on Opera can opt for testing on the Chrome browser. PhantomJS users can opt for testing on Firefox and Chrome in the headless mode.
See v4.0.0-alpha.1