operachromiumdriver
operachromiumdriver copied to clipboard
SessionNotCreatedException: Message: session not created: No matching capabilities found
OS: Win 10 64 bit Opera: 62.0.3331.99 operadriver: 75.0.3770.100 Error Log:
test setup failed self = <drivers.driver.Driver object at 0x042513D0>
def _set_driver(self):
if self.browser == 'opera':
options = Options()
options.binary_location = DriverPath.OPERA_BINARY_PATH
print('\nBinary Path: {}'.format(DriverPath.OPERA_BINARY_PATH))
try:
path = self._get_driver_path()
self.driver = webdriver.Opera(options=options, executable_path=path)
..\drivers\driver.py:40:
self = <selenium.webdriver.opera.webdriver.WebDriver (session="None")> desired_capabilities = None executable_path = 'C:\Users\superadmin\Documents\GitHub\SELENIUM_WEBDRIVER_WORKING_WITH_ELEMENTS\drivers\opera\win_64\75.0.3770.100\operadriver.exe' port = 0, service_log_path = None, service_args = None options = <selenium.webdriver.opera.options.Options object at 0x042513B0>
def __init__(self,
desired_capabilities=None,
executable_path=None,
port=0,
service_log_path=None,
service_args=None,
options=None):
OperaDriver.__init__(self, executable_path=executable_path,
port=port, options=options,
service_args=service_args,
desired_capabilities=desired_capabilities,
service_log_path=service_log_path)
..\venv\lib\site-packages\selenium\webdriver\opera\webdriver.py:83:
self = <selenium.webdriver.opera.webdriver.WebDriver (session="None")> executable_path = 'C:\Users\superadmin\Documents\GitHub\SELENIUM_WEBDRIVER_WORKING_WITH_ELEMENTS\drivers\opera\win_64\75.0.3770.100\operadriver.exe' port = 0 options = <selenium.webdriver.opera.options.Options object at 0x042513B0> service_args = None, desired_capabilities = None, service_log_path = None opera_options = None, keep_alive = True
def __init__(self, executable_path=None, port=0,
options=None, service_args=None,
desired_capabilities=None, service_log_path=None,
opera_options=None, keep_alive=True):
"""
Creates a new instance of the operadriver.
Starts the service and then creates new instance of operadriver.
:Args:
- executable_path - path to the executable. If the default is used
it assumes the executable is in the $PATH
- port - port you would like the service to run, if left as 0,
a free port will be found.
- options: this takes an instance of OperaOptions
- service_args - List of args to pass to the driver service
- desired_capabilities: Dictionary object with non-browser specific
- service_log_path - Where to log information from the driver.
- opera_options - Deprecated argument for options
capabilities only, such as "proxy" or "loggingPref".
"""
if opera_options:
warnings.warn('use options instead of opera_options',
DeprecationWarning, stacklevel=2)
options = opera_options
executable_path = (executable_path if executable_path is not None
else "operadriver")
ChromiumDriver.__init__(self,
executable_path=executable_path,
port=port,
options=options,
service_args=service_args,
desired_capabilities=desired_capabilities,
service_log_path=service_log_path,
keep_alive=keep_alive)
..\venv\lib\site-packages\selenium\webdriver\opera\webdriver.py:62:
self = <selenium.webdriver.opera.webdriver.WebDriver (session="None")> executable_path = 'C:\Users\superadmin\Documents\GitHub\SELENIUM_WEBDRIVER_WORKING_WITH_ELEMENTS\drivers\opera\win_64\75.0.3770.100\operadriver.exe' port = 0 options = <selenium.webdriver.opera.options.Options object at 0x042513B0> service_args = None desired_capabilities = {'browserName': 'opera', 'operaOptions': {'args': [], 'binary': 'C:\Users\superadmin\AppData\Local\Programs\Opera\62.0.3331.99\opera.exe', 'extensions': []}, 'platform': 'ANY', 'version': ''} service_log_path = None, chrome_options = None, keep_alive = True
def __init__(self, executable_path="chromedriver", port=0,
options=None, service_args=None,
desired_capabilities=None, service_log_path=None,
chrome_options=None, keep_alive=True):
"""
Creates a new instance of the chrome driver.
Starts the service and then creates new instance of chrome driver.
:Args:
- executable_path - path to the executable. If the default is used it assumes the executable is in the $PATH
- port - port you would like the service to run, if left as 0, a free port will be found.
- options - this takes an instance of ChromeOptions
- service_args - List of args to pass to the driver service
- desired_capabilities - Dictionary object with non-browser specific
capabilities only, such as "proxy" or "loggingPref".
- service_log_path - Where to log information from the driver.
- chrome_options - Deprecated argument for options
- keep_alive - Whether to configure ChromeRemoteConnection to use HTTP keep-alive.
"""
if chrome_options:
warnings.warn('use options instead of chrome_options',
DeprecationWarning, stacklevel=2)
options = chrome_options
if options is None:
# desired_capabilities stays as passed in
if desired_capabilities is None:
desired_capabilities = self.create_options().to_capabilities()
else:
if desired_capabilities is None:
desired_capabilities = options.to_capabilities()
else:
desired_capabilities.update(options.to_capabilities())
self.service = Service(
executable_path,
port=port,
service_args=service_args,
log_path=service_log_path)
self.service.start()
try:
RemoteWebDriver.__init__(
self,
command_executor=ChromeRemoteConnection(
remote_server_addr=self.service.service_url,
keep_alive=keep_alive),
desired_capabilities=desired_capabilities)
..\venv\lib\site-packages\selenium\webdriver\chrome\webdriver.py:81:
self = <selenium.webdriver.opera.webdriver.WebDriver (session="None")> command_executor = <selenium.webdriver.chrome.remote_connection.ChromeRemoteConnection object at 0x04251530> desired_capabilities = {'browserName': 'opera', 'operaOptions': {'args': [], 'binary': 'C:\Users\superadmin\AppData\Local\Programs\Opera\62.0.3331.99\opera.exe', 'extensions': []}, 'platform': 'ANY', 'version': ''} browser_profile = None, proxy = None, keep_alive = False, file_detector = None options = None
def __init__(self, command_executor='http://127.0.0.1:4444/wd/hub',
desired_capabilities=None, browser_profile=None, proxy=None,
keep_alive=False, file_detector=None, options=None):
"""
Create a new driver that will issue commands using the wire protocol.
:Args:
- command_executor - Either a string representing URL of the remote server or a custom
remote_connection.RemoteConnection object. Defaults to 'http://127.0.0.1:4444/wd/hub'.
- desired_capabilities - A dictionary of capabilities to request when
starting the browser session. Required parameter.
- browser_profile - A selenium.webdriver.firefox.firefox_profile.FirefoxProfile object.
Only used if Firefox is requested. Optional.
- proxy - A selenium.webdriver.common.proxy.Proxy object. The browser session will
be started with given proxy settings, if possible. Optional.
- keep_alive - Whether to configure remote_connection.RemoteConnection to use
HTTP keep-alive. Defaults to False.
- file_detector - Pass custom file detector object during instantiation. If None,
then default LocalFileDetector() will be used.
- options - instance of a driver options.Options class
"""
capabilities = {}
if options is not None:
capabilities = options.to_capabilities()
if desired_capabilities is not None:
if not isinstance(desired_capabilities, dict):
raise WebDriverException("Desired Capabilities must be a dictionary")
else:
capabilities.update(desired_capabilities)
if proxy is not None:
warnings.warn("Please use FirefoxOptions to set proxy",
DeprecationWarning, stacklevel=2)
proxy.add_to_capabilities(capabilities)
self.command_executor = command_executor
if type(self.command_executor) is bytes or isinstance(self.command_executor, str):
self.command_executor = RemoteConnection(command_executor, keep_alive=keep_alive)
self._is_remote = True
self.session_id = None
self.capabilities = {}
self.error_handler = ErrorHandler()
self.start_client()
if browser_profile is not None:
warnings.warn("Please use FirefoxOptions to set browser profile",
DeprecationWarning, stacklevel=2)
self.start_session(capabilities, browser_profile)
..\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py:157:
self = <selenium.webdriver.opera.webdriver.WebDriver (session="None")> capabilities = {'browserName': 'opera', 'operaOptions': {'args': [], 'binary': 'C:\Users\superadmin\AppData\Local\Programs\Opera\62.0.3331.99\opera.exe', 'extensions': []}, 'platform': 'ANY', 'version': ''} browser_profile = None
def start_session(self, capabilities, browser_profile=None):
"""
Creates a new session with the desired capabilities.
:Args:
- browser_name - The name of the browser to request.
- version - Which browser version to request.
- platform - Which platform to request the browser on.
- javascript_enabled - Whether the new session should support JavaScript.
- browser_profile - A selenium.webdriver.firefox.firefox_profile.FirefoxProfile object. Only used if Firefox is requested.
"""
if not isinstance(capabilities, dict):
raise InvalidArgumentException("Capabilities must be a dictionary")
if browser_profile:
if "moz:firefoxOptions" in capabilities:
capabilities["moz:firefoxOptions"]["profile"] = browser_profile.encoded
else:
capabilities.update({'firefox_profile': browser_profile.encoded})
w3c_caps = _make_w3c_caps(capabilities)
parameters = {"capabilities": w3c_caps,
"desiredCapabilities": capabilities}
response = self.execute(Command.NEW_SESSION, parameters)
..\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py:252:
self = <selenium.webdriver.opera.webdriver.WebDriver (session="None")> driver_command = 'newSession' params = {'capabilities': {'alwaysMatch': {'browserName': 'opera', 'platformName': 'any'}, 'firstMatch': [{}]}, 'desiredCapabil...admin\AppData\Local\Programs\Opera\62.0.3331.99\opera.exe', 'extensions': []}, 'platform': 'ANY', 'version': ''}}
def execute(self, driver_command, params=None):
"""
Sends a command to be executed by a command.CommandExecutor.
:Args:
- driver_command: The name of the command to execute as a string.
- params: A dictionary of named parameters to send with the command.
:Returns:
The command's JSON response loaded into a dictionary object.
"""
if self.session_id is not None:
if not params:
params = {'sessionId': self.session_id}
elif 'sessionId' not in params:
params['sessionId'] = self.session_id
params = self._wrap_value(params)
response = self.command_executor.execute(driver_command, params)
if response:
self.error_handler.check_response(response)
..\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py:321:
self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x04251790> response = {'status': 500, 'value': '{"value":{"error":"session not created","message":"session not created: No matching capabili...98E8D+1281677]\n\tBaseThreadInitThunk [0x00007FF9D1B07974+20]\n\tRtlUserThreadStart [0x00007FF9D42CA271+33]\n"}}'}
def check_response(self, response):
"""
Checks that a JSON response from the WebDriver does not have an error.
:Args:
- response - The JSON response from the WebDriver server as a dictionary
object.
:Raises: If the response contains an error message.
"""
status = response.get('status', None)
if status is None or status == ErrorCode.SUCCESS:
return
value = None
message = response.get("message", "")
screen = response.get("screen", "")
stacktrace = None
if isinstance(status, int):
value_json = response.get('value', None)
if value_json and isinstance(value_json, basestring):
import json
try:
value = json.loads(value_json)
if len(value.keys()) == 1:
value = value['value']
status = value.get('error', None)
if status is None:
status = value["status"]
message = value["value"]
if not isinstance(message, basestring):
value = message
message = message.get('message')
else:
message = value.get('message', None)
except ValueError:
pass
exception_class = ErrorInResponseException
if status in ErrorCode.NO_SUCH_ELEMENT:
exception_class = NoSuchElementException
elif status in ErrorCode.NO_SUCH_FRAME:
exception_class = NoSuchFrameException
elif status in ErrorCode.NO_SUCH_WINDOW:
exception_class = NoSuchWindowException
elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
exception_class = StaleElementReferenceException
elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
exception_class = ElementNotVisibleException
elif status in ErrorCode.INVALID_ELEMENT_STATE:
exception_class = InvalidElementStateException
elif status in ErrorCode.INVALID_SELECTOR \
or status in ErrorCode.INVALID_XPATH_SELECTOR \
or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
exception_class = InvalidSelectorException
elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
exception_class = ElementNotSelectableException
elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE:
exception_class = ElementNotInteractableException
elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
exception_class = InvalidCookieDomainException
elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
exception_class = UnableToSetCookieException
elif status in ErrorCode.TIMEOUT:
exception_class = TimeoutException
elif status in ErrorCode.SCRIPT_TIMEOUT:
exception_class = TimeoutException
elif status in ErrorCode.UNKNOWN_ERROR:
exception_class = WebDriverException
elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
exception_class = UnexpectedAlertPresentException
elif status in ErrorCode.NO_ALERT_OPEN:
exception_class = NoAlertPresentException
elif status in ErrorCode.IME_NOT_AVAILABLE:
exception_class = ImeNotAvailableException
elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
exception_class = ImeActivationFailedException
elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
exception_class = MoveTargetOutOfBoundsException
elif status in ErrorCode.JAVASCRIPT_ERROR:
exception_class = JavascriptException
elif status in ErrorCode.SESSION_NOT_CREATED:
exception_class = SessionNotCreatedException
elif status in ErrorCode.INVALID_ARGUMENT:
exception_class = InvalidArgumentException
elif status in ErrorCode.NO_SUCH_COOKIE:
exception_class = NoSuchCookieException
elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN:
exception_class = ScreenshotException
elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED:
exception_class = ElementClickInterceptedException
elif status in ErrorCode.INSECURE_CERTIFICATE:
exception_class = InsecureCertificateException
elif status in ErrorCode.INVALID_COORDINATES:
exception_class = InvalidCoordinatesException
elif status in ErrorCode.INVALID_SESSION_ID:
exception_class = InvalidSessionIdException
elif status in ErrorCode.UNKNOWN_METHOD:
exception_class = UnknownMethodException
else:
exception_class = WebDriverException
if value == '' or value is None:
value = response['value']
if isinstance(value, basestring):
if exception_class == ErrorInResponseException:
raise exception_class(response, value)
raise exception_class(value)
if message == "" and 'message' in value:
message = value['message']
screen = None
if 'screen' in value:
screen = value['screen']
stacktrace = None
if 'stackTrace' in value and value['stackTrace']:
stacktrace = []
try:
for frame in value['stackTrace']:
line = self._value_or_default(frame, 'lineNumber', '')
file = self._value_or_default(frame, 'fileName', '<anonymous>')
if line:
file = "%s:%s" % (file, line)
meth = self._value_or_default(frame, 'methodName', '<anonymous>')
if 'className' in frame:
meth = "%s.%s" % (frame['className'], meth)
msg = " at %s (%s)"
msg = msg % (meth, file)
stacktrace.append(msg)
except TypeError:
pass
if exception_class == ErrorInResponseException:
raise exception_class(response, message)
elif exception_class == UnexpectedAlertPresentException:
alert_text = None
if 'data' in value:
alert_text = value['data'].get('text')
elif 'alert' in value:
alert_text = value['alert'].get('text')
raise exception_class(message, screen, stacktrace, alert_text)
raise exception_class(message, screen, stacktrace)
E selenium.common.exceptions.SessionNotCreatedException: Message: session not created: No matching capabilities found
..\venv\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: SessionNotCreatedException
During handling of the above exception, another exception occurred:
cls = <class 'basic_driver_test.opera_driver_test.MyTestCase'>
@classmethod
def setUpClass(cls):
cls.driver = Driver('opera').get_driver()
opera_driver_test.py:12:
..\drivers\driver.py:28: in init self._set_driver() ..\drivers\driver.py:47: in _set_driver self.driver = webdriver.Opera(options=options, executable_path=path) ..\venv\lib\site-packages\selenium\webdriver\opera\webdriver.py:83: in init service_log_path=service_log_path) ..\venv\lib\site-packages\selenium\webdriver\opera\webdriver.py:62: in init keep_alive=keep_alive) ..\venv\lib\site-packages\selenium\webdriver\chrome\webdriver.py:81: in init desired_capabilities=desired_capabilities) ..\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py:157: in init self.start_session(capabilities, browser_profile) ..\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py:252: in start_session response = self.execute(Command.NEW_SESSION, parameters) ..\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response)
self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x041E2C10> response = {'status': 500, 'value': '{"value":{"error":"session not created","message":"session not created: No matching capabili...98E8D+1281677]\n\tBaseThreadInitThunk [0x00007FF9D1B07974+20]\n\tRtlUserThreadStart [0x00007FF9D42CA271+33]\n"}}'}
def check_response(self, response):
"""
Checks that a JSON response from the WebDriver does not have an error.
:Args:
- response - The JSON response from the WebDriver server as a dictionary
object.
:Raises: If the response contains an error message.
"""
status = response.get('status', None)
if status is None or status == ErrorCode.SUCCESS:
return
value = None
message = response.get("message", "")
screen = response.get("screen", "")
stacktrace = None
if isinstance(status, int):
value_json = response.get('value', None)
if value_json and isinstance(value_json, basestring):
import json
try:
value = json.loads(value_json)
if len(value.keys()) == 1:
value = value['value']
status = value.get('error', None)
if status is None:
status = value["status"]
message = value["value"]
if not isinstance(message, basestring):
value = message
message = message.get('message')
else:
message = value.get('message', None)
except ValueError:
pass
exception_class = ErrorInResponseException
if status in ErrorCode.NO_SUCH_ELEMENT:
exception_class = NoSuchElementException
elif status in ErrorCode.NO_SUCH_FRAME:
exception_class = NoSuchFrameException
elif status in ErrorCode.NO_SUCH_WINDOW:
exception_class = NoSuchWindowException
elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
exception_class = StaleElementReferenceException
elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
exception_class = ElementNotVisibleException
elif status in ErrorCode.INVALID_ELEMENT_STATE:
exception_class = InvalidElementStateException
elif status in ErrorCode.INVALID_SELECTOR \
or status in ErrorCode.INVALID_XPATH_SELECTOR \
or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
exception_class = InvalidSelectorException
elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
exception_class = ElementNotSelectableException
elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE:
exception_class = ElementNotInteractableException
elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
exception_class = InvalidCookieDomainException
elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
exception_class = UnableToSetCookieException
elif status in ErrorCode.TIMEOUT:
exception_class = TimeoutException
elif status in ErrorCode.SCRIPT_TIMEOUT:
exception_class = TimeoutException
elif status in ErrorCode.UNKNOWN_ERROR:
exception_class = WebDriverException
elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
exception_class = UnexpectedAlertPresentException
elif status in ErrorCode.NO_ALERT_OPEN:
exception_class = NoAlertPresentException
elif status in ErrorCode.IME_NOT_AVAILABLE:
exception_class = ImeNotAvailableException
elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
exception_class = ImeActivationFailedException
elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
exception_class = MoveTargetOutOfBoundsException
elif status in ErrorCode.JAVASCRIPT_ERROR:
exception_class = JavascriptException
elif status in ErrorCode.SESSION_NOT_CREATED:
exception_class = SessionNotCreatedException
elif status in ErrorCode.INVALID_ARGUMENT:
exception_class = InvalidArgumentException
elif status in ErrorCode.NO_SUCH_COOKIE:
exception_class = NoSuchCookieException
elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN:
exception_class = ScreenshotException
elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED:
exception_class = ElementClickInterceptedException
elif status in ErrorCode.INSECURE_CERTIFICATE:
exception_class = InsecureCertificateException
elif status in ErrorCode.INVALID_COORDINATES:
exception_class = InvalidCoordinatesException
elif status in ErrorCode.INVALID_SESSION_ID:
exception_class = InvalidSessionIdException
elif status in ErrorCode.UNKNOWN_METHOD:
exception_class = UnknownMethodException
else:
exception_class = WebDriverException
if value == '' or value is None:
value = response['value']
if isinstance(value, basestring):
if exception_class == ErrorInResponseException:
raise exception_class(response, value)
raise exception_class(value)
if message == "" and 'message' in value:
message = value['message']
screen = None
if 'screen' in value:
screen = value['screen']
stacktrace = None
if 'stackTrace' in value and value['stackTrace']:
stacktrace = []
try:
for frame in value['stackTrace']:
line = self._value_or_default(frame, 'lineNumber', '')
file = self._value_or_default(frame, 'fileName', '<anonymous>')
if line:
file = "%s:%s" % (file, line)
meth = self._value_or_default(frame, 'methodName', '<anonymous>')
if 'className' in frame:
meth = "%s.%s" % (frame['className'], meth)
msg = " at %s (%s)"
msg = msg % (meth, file)
stacktrace.append(msg)
except TypeError:
pass
if exception_class == ErrorInResponseException:
raise exception_class(response, message)
elif exception_class == UnexpectedAlertPresentException:
alert_text = None
if 'data' in value:
alert_text = value['data'].get('text')
elif 'alert' in value:
alert_text = value['alert'].get('text')
raise exception_class(message, screen, stacktrace, alert_text)
raise exception_class(message, screen, stacktrace)
E selenium.common.exceptions.SessionNotCreatedException: Message: session not created: No matching capabilities found
..\venv\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: SessionNotCreatedException
i too have this problem,I killed a lot of time for search solution, but did not find c#, Win 64 and 32
Found that it works with the following capabilities:
browserName = "chrome"
browserVersion = "62.0"
It seems that webdriver binary is built with incorrect browser name inside (original Chrome).
Thanks for the comment. So it looks like it won't work for anyone unless you specify wrong browser name... wow
I had Opera webdriver working correctly. After updating the browser to 62 and the driver to 75 it stops working with this stupid error message. You broke it! Congratulations! Who was so clever to upload a webdriver to Github which does not even start the browser? Don't you do thorough testing before uploading a new version?
Seems like people starting waking up which is a good thing. It's been 10 days since I opened this issue and yet we have no response from the dev team... But I still have a hope.
Encountering same problem here :(. Hope this gets picked up/commented on/resolved soon!
I am using bonigarcia method for launching browsers, Other browsers like Chrome, Firefox, Edge launches fine but when I tried with Opera it not launching,
if(browser.equalsIgnoreCase("Opera")) { WebDriverManager.operadriver().setup(); tldriver.set(new OperaDriver());
Even I am getting below error message while using in Selenium
org.openqa.selenium.SessionNotCreatedException: session not created: No matching capabilities found Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
Please resolve!
I have the same problem using Opera 62 and Opera web driver 75.0.3770.100 (Windows 64 bit)
Launch sequence in Java: OperaOptions options = new OperaOptions(); options.setBinary("C:/Opera/62.0.3331.99/opera.exe"); webDriver = new OperaDriver(options);
Error message: SessionNotCreatedException: Message: session not created: No matching capabilities found
It worked well with Opera 60 and wed driver 2.45 I hope it will be fixed soon. Thanks.
I have successfully downgraded to older opera web driver v2.42 It seems to be a valid solution and it works with Opera 62 Have a good day.
I have successfully downgraded to older opera web driver v2.42 It seems to be a valid solution and it works with Opera 62 Have a good day.
Actually it is not a valid solution. I am pretty sure that driver v2.42 dos not support Opera 62. Just check your Opera binary folder and you will see that an old opera version is still there, meaning you working with Opera 60 or so.
As far as I understand the only workaround is to specify following capabilities:
browserName = "chrome" browserVersion = "62.0"
No need, just use old web driver 2.42 64 bit and check yourself, it works with Opera 62 (latest version). Windows 10 64 bit, Java, Selenium 3.141.59, TestNG 6.9.8
When used with Opera 62, driver version 2.42 returns the error session not created: Opera needs to be based on Chromium version between 70 and 73
for me, so downgrading the driver is not a valid option.
As far as I understand the only workaround is to specify following capabilities:
browserName = "chrome" browserVersion = "62.0"
Where should i set these parameters ? I tried to do this, but to no avail.
Function where i try to run web driver (without capabilities):
def setUp(self):
self.browser = webdriver.Firefox()
Thanks.
As far as I understand the only workaround is to specify following capabilities: browserName = "chrome" browserVersion = "62.0"
Where should i set these parameters ? I tried to do this, but to no avail.
Function where i try to run web driver (without capabilities):
def setUp(self): self.browser = webdriver.Firefox()
Thanks.
Hi there.
I gave up on this issue a few weeks ago. You better ask @vania-pooh how to do since it was his original comment.
Thanks.
@dakofiev these are standard Selenium capabilities to be set in the code.
Hi Guys! Sorry for delayed answer.
I have also experienced this issue. A quick workaround should be to use ChromeOptions() and additional argument for the browser: "allow-elevated-browser":
from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_argument('allow-elevated-browser')
driver = webdriver.Opera(options=options)
There is another issue with OperaDriver - which is not able to find Opera binary if it's installed in other location than "Program Files" or "Program Files (x86)". In such case "binary_location" option must be specified as well to properly locate the binary.
e.g.
options.binary_location = C:/Users/....../opera.exe
Make sure you also use the latest official selenium package (3.141.0). I hope this helps.
@rkrupski btw, official Opera Linux packages (aka opera-stable
) install Opera to /usr/bin/opera
, so at least this path should be processed too in operadriver binary.
@rkrupski btw, I see that Opera 63.0.3368.43 was released. Could you add respective binary for Operadriver?
@rkrupski, @ikostan, @vania-pooh, guys, thank you very much !!!
@vania-pooh We're going to release a new OperaDriver soon, but first we want to fix the problem with "No matching capabilities found" to eliminate a need to use any workarounds.
@rkrupski glad to hear. It would be great if you add /usr/bin/opera
as one of default search locations: https://github.com/bayandin/chromedriver/blob/master/chrome/chrome_finder.cc
for mac need to add following values for edge 80 and above
edge_opts = EdgeOptions()
edge_opts.use_chromium=True
edge_opts._page_load_strategy='eager'
edge_opts.add_argument("headless")
edge_opts.add_argument("disable-gpu")
app.logger.info("using edge options")
edge_caps = edge_opts.to_capabilities()
edge_caps["browserName"]="MicrosoftEdge"
edge_caps["platform"]="MAC
and refer these below links https://github.com/microsoft/edge-selenium-tools https://docs.microsoft.com/en-us/microsoft-edge/webdriver-chromium?tabs=c-sharp
I got a same problem when i use msedgedriver to run an integration test.
change the web_driver_server.dart work for me.
Thanks to my technical leader for telling me this solution.
I hope this helps.