from selenium import webdriver
driver = webdriver.Edge(r"/Users/pranav/Downloads/edgedriver_mac64/msedgedriver")
このコードを実行すると、Chrome と同じように Edge がポップアップすることを期待していましたが、起こりません。次のエラーが表示されます。
Traceback (most recent call last):
File "/Users/pranav/Documents/Python/Scripts/Edge Auto.py", line 3, in <module>
driver = webdriver.Edge(r"/Users/pranav/Downloads/edgedriver_mac64/msedgedriver")
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/selenium/webdriver/edge/webdriver.py", line 61, in __init__
RemoteWebDriver.__init__(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: No matching capabilities found