I added to my environment variable
SELENIUM_SERVER_JAR = C:\\selenium_drivers\\selenium-server-standalone.jar
Which I downloaded here http
The code below worked for me on the following setup. Hope this helps.
ChromeDriver: 2.27.440174
import os
from selenium import webdriver
from selenium.webdriver.common import desired_capabilities
from selenium.webdriver.opera import options
_operaDriverLoc = os.path.abspath('E:\\Envs\\PySelEnv\\selserver\\chromedriver.exe') # Replace this path with the actual path on your machine.
_operaExeLoc = os.path.abspath('E:\\Program Files\\Opera\\42.0.2393.94\\opera.exe') # Replace this path with the actual path on your machine.
_remoteExecutor = 'http://127.0.0.1:9515'
_operaCaps = desired_capabilities.DesiredCapabilities.OPERA.copy()
_operaOpts = options.ChromeOptions()
_operaOpts._binary_location = _operaExeLoc
# Use the below argument if you want the Opera browser to be in the maximized state when launching.
# The full list of supported arguments can be found on http://peter.sh/experiments/chromium-command-line-switches/
_operaOpts.add_argument('--start-maximized')
self._browserDriver = webdriver.Chrome(executable_path = _operaDriverLoc, chrome_options = _operaOpts, desired_capabilities = _operaCaps)