2016-10-13 16 views
-1

FirefoxSeleniumで開こうとするとエラーが発生します。私はこれを試してみました:Selenium Pythonを使用してFirefoxを開くことができません

from selenium import webdriver 
from selenium.webdriver.firefox.webdriver import FirefoxProfile 

profile = FirefoxProfile('/home/usr/.mozilla/firefox') 
driver = webdriver.Firefox(profile) 

エラー:

selenium.common.exceptions.WebdriverException: Message: Can't load the 
profile. Profile Dir: '...../webdriver-py-profilecopy' If you specified 
a log_file in the FirefoxBinary constructor, check it for details. 
+1

あなたのコードやコード行に使用する技術ではなく、短い問題の説明をタイトルとしてください。 – Andersson

+0

'firefox'と' selenium'のdバージョンは何ですか? ? –

+0

あなたはどのOSを実行していますか?プロファイルを設定せずにロードするとどうなりますか? – iNoob

答えて

0

試してみてください。

from selenium import webdriver 

driver = webdriver.Firefox() 
driver.get('http://google.com') 
+0

このコードスニペットは問題を解決するかもしれませんが、[説明を含む](http://meta.stackexchange.com/questions/114762/explaining-entirely-code-based-answers)は本当にあなたの投稿の質を向上させるのに役立ちます。将来読者の質問に答えていることを覚えておいてください。そうした人々はあなたのコード提案の理由を知らないかもしれません。 – andreas

関連する問題