質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
スクレイピング

スクレイピングとは、公開されているWebサイトからページ内の情報を抽出する技術です。

Firefox

Mozilla Foundationによって作られた無料、オープンソース、クロスプラットフォームなウェブブラウザ

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

selenium

Selenium(セレニウム)は、ブラウザをプログラムで作動させるフレームワークです。この原理を使うことにより、ブラウザのユーザーテストなどを自動化にすることができます。

Q&A

0回答

330閲覧

seleniumを使用してfirefoxを立ち上げる

MuraokaAtsunori

総合スコア8

スクレイピング

スクレイピングとは、公開されているWebサイトからページ内の情報を抽出する技術です。

Firefox

Mozilla Foundationによって作られた無料、オープンソース、クロスプラットフォームなウェブブラウザ

Python

Pythonは、コードの読みやすさが特徴的なプログラミング言語の1つです。 強い型付け、動的型付けに対応しており、後方互換性がないバージョン2系とバージョン3系が使用されています。 商用製品の開発にも無料で使用でき、OSだけでなく仮想環境にも対応。Unicodeによる文字列操作をサポートしているため、日本語処理も標準で可能です。

selenium

Selenium(セレニウム)は、ブラウザをプログラムで作動させるフレームワークです。この原理を使うことにより、ブラウザのユーザーテストなどを自動化にすることができます。

0グッド

1クリップ

投稿2019/04/12 06:04

前提・実現したいこと

seleniumを使用してfirefoxの立ち上げをしたいです。
PCを新しくすると動作しなくなりました。
(Firefoxが立ち上がるのですがすぐにエラーとなってしまいます。)
「WebDriverException: Message: newSession」と出ています。

発生している問題・エラーメッセージ

--------------------------------------------------------------------------- WebDriverException Traceback (most recent call last) <ipython-input-9-e767936b7868> in <module>() ----> 1 browser = webdriver.Firefox() 2 # browser = webdriver.Firefox(executable_path="C:\Users\atsunori.muraoka\Python") 3 4 # browser.get('https://baseconnect.in/users/sign_in') ~\Anaconda3\lib\site-packages\selenium\webdriver\firefox\webdriver.py in __init__(self, firefox_profile, firefox_binary, timeout, capabilities, proxy, executable_path, firefox_options, log_path) 152 command_executor=executor, 153 desired_capabilities=capabilities, --> 154 keep_alive=True) 155 156 # Selenium remote ~\Anaconda3\lib\site-packages\selenium\webdriver\remote\webdriver.py in __init__(self, command_executor, desired_capabilities, browser_profile, proxy, keep_alive, file_detector) 149 warnings.warn("Please use FirefoxOptions to set browser profile", 150 DeprecationWarning) --> 151 self.start_session(desired_capabilities, browser_profile) 152 self._switch_to = SwitchTo(self) 153 self._mobile = Mobile(self) ~\Anaconda3\lib\site-packages\selenium\webdriver\remote\webdriver.py in start_session(self, capabilities, browser_profile) 238 parameters = {"capabilities": w3c_caps, 239 "desiredCapabilities": capabilities} --> 240 response = self.execute(Command.NEW_SESSION, parameters) 241 if 'sessionId' not in response: 242 response = response['value'] ~\Anaconda3\lib\site-packages\selenium\webdriver\remote\webdriver.py in execute(self, driver_command, params) 306 response = self.command_executor.execute(driver_command, params) 307 if response: --> 308 self.error_handler.check_response(response) 309 response['value'] = self._unwrap_value( 310 response.get('value', None)) ~\Anaconda3\lib\site-packages\selenium\webdriver\remote\errorhandler.py in check_response(self, response) 192 elif exception_class == UnexpectedAlertPresentException and 'alert' in value: 193 raise exception_class(message, screen, stacktrace, value['alert'].get('text')) --> 194 raise exception_class(message, screen, stacktrace) 195 196 def _value_or_default(self, obj, key, default): WebDriverException: Message: newSession

該当のソースコード

from selenium import webdriver browser = webdriver.Firefox()

試したこと

補足情報(FW/ツールのバージョンなど)

jupyterを使用しています。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問