IDLEのF5で実行するとエラーはでないのに、pyファイルをダブルクリックやコマンドから実行するとエラーになります。
解決方法を教えてください。
よろしくお願いいたします。
python 3.6.4
selenium 3.10.0
geckodriver 0.23.0 win64
windows7
python
1# -*- coding: utf-8 -*- 2 3from selenium import webdriver 4from selenium.webdriver.firefox.options import Options 5import time 6 7 8options = Options() 9driver = webdriver.Firefox(firefox_options=options, executable_path='geckodriver.exe') 10 11driver.get('https://www.google.co.jp/') 12time.sleep(3) 13 14 15driver.quit()
error
1Traceback (most recent call last): 2 File "test.py", line 9, in <module> 3 driver = webdriver.Firefox(firefox_options=options, executable_path='geckodriver.exe') 4 File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\lkages\selenium\webdriver\firefox\webdriver.py", line 162, in __init__ 5 keep_alive=True) 6 File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\lkages\selenium\webdriver\remote\webdriver.py", line 154, in __init__ 7 self.start_session(desired_capabilities, browser_profile) 8 File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\lkages\selenium\webdriver\remote\webdriver.py", line 243, in start_ses 9 response = self.execute(Command.NEW_SESSION, parameters) 10 File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\lkages\selenium\webdriver\remote\webdriver.py", line 312, in execute 11 self.error_handler.check_response(response) 12 File "C:\Users\user\AppData\Local\Programs\Python\Python36-32\lkages\selenium\webdriver\remote\errorhandler.py", line 242, in check_ 13 raise exception_class(message, screen, stacktrace) 14selenium.common.exceptions.SessionNotCreatedException: Message: Faile 15browser C:\Program Files\Mozilla Firefox\firefox.exe: other os error
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。