Skip to content

Instantly share code, notes, and snippets.

View wladzynski's full-sized avatar

Wojciech Ladzynski wladzynski

View GitHub Profile
import selenium.webdriver.chrome.service as service
import subprocess
from selenium.webdriver.remote.webdriver import WebDriver
# Port 55000 is just an example, choose any suitable value here
debugging_port = 55000
subprocess.Popen(['Path_to_opera_binary', '--remote-debugging-port={}'.format(debugging_port)])
service = service.Service('Path_to_operadriver_binary')
from selenium.webdriver.remote.webdriver import WebDriver
import selenium.webdriver.chrome.service as service
service = service.Service('Path_to_operadriver')
service.start()
WebDriver(service.service_url, {'operaOptions': {'binary':'Path_to_Opera_binary'}})