I am unable to open URL using python selenium library on Opera browser.
Code
from selenium import webdriver
from selenium.webdriver.opera.options import Options
options = Options()
options.binary_location = r'C:\Opera\launcher.exe'
driver = webdriver.Opera(options=options, executable_path=r'C:\path\to\operadriver.exe')
driver.get("http://google.com/")
Output:
[13160:7544:0120/214514.952:ERROR:os_crypt_win.cc(61)] Failed to decrypt: The parameter is incorrect. (0x57)
DevTools listening on ws://127.0.0.1:59391/devtools/browser/709f6a5d-ac20-4bd1-b5d0-a80adaa465aa
[13160:7544:0120/214515.553:ERROR:CONSOLE(0)] "Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.", source: chrome://startpage/ (0)
[13160:7544:0120/214515.553:ERROR:CONSOLE(0)] "Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.", source: chrome://startpage/ (0)
[13160:7544:0120/214515.554:ERROR:CONSOLE(0)] "Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.", source: chrome://startpage/ (0)
Traceback:
File "traffic.py", line 24, in <module>
driver = webdriver.Opera(options=options, executable_path=r'C:\Users\Desktop\Work\Whatsapp\chrome\operadriver.exe')
File "C:\Users\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\opera\webdriver.py", line 83, in __init__ service_log_path=service_log_path)
File "C:\Users\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\opera\webdriver.py", line 62, in __init__ keep_alive=keep_alive)
File "C:\Users\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 81, in __init__ desired_capabilities=desired_capabilities)
File "C:\Users\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__ self.start_session(capabilities, browser_profile)
File "C:\Users\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session response = self.execute(Command.NEW_SESSION, parameters)
File "C:\Users\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute self.error_handler.check_response(response)
File "C:\Users\AppData\Local\Programs\Python\Python37\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Opera failed to start: exited normally
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location C:\Users\AppData\Local\Programs\Opera\launcher.exe is no longer running, so OperaDriver is assuming that Opera has crashed.)
(Driver info: OperaDriver=79.0.3945.79 (29f75ce3f42b007bd80361b0dfcfee3a13ff90b8-refs/branch-heads/3945@{#916}),platform=Windows NT 10.0.18362 x86_64)
Kindly help in opening the passed URL on Opera using Python Selenium libraries.
//Regards