operasoftware / operachromiumdriver

OperaDriver for Chromium-based Opera releases
Other
259 stars 47 forks source link

Python - "Opera Driver is no longer running, so OperaDriver assumed that Opera has crashed" #89

Open ghost opened 3 years ago

ghost commented 3 years ago

Opera GX Driver Issue

I have my code here, where I'm just trying to get the driver to work properly and carry out a basic task by opening the Opera GX website. I have created the PATH and assigned it to the binary_location attribute.

from selenium import webdriver
from selenium.webdriver.opera.options import Options

PATH = r'C:\Program Files (x86)\operadriver.exe'

options = Options()
options.binary_location = PATH

driver = webdriver.Opera(options=options, executable_path = PATH)
driver.get("http://www.opera.com")

When I run this, I get a strange error.

selenium.common.exceptions.WebDriverException: Message: unknown error: Opera failed to start: was killed.
  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from opera location C:\Program Files (x86)\operadriver.exe is no longer running, so OperaDriver is assuming that Opera has crashed.)
  (Driver info: operadriver=90.0.4430.85 (5bc145d831c180d9ff94f29a0d7a2e1cbd30ef36-refs/branch-heads/4430@{#1311}),platform=Windows NT 10.0.19041 x86_64)

I've tried looking for other people who have run into this issue but to no avail. It keeps giving me an error, saying that operadriver.exe is no longer running.

I have downloaded the most recent version of Opera Driver (it was released about 5 hours ago), and I'm not really sure what else is causing my code to break.

Any suggestions or help would be appreciated.

sufyanhamid commented 2 years ago

Hi @AyushTrip Did you get the solution for this??