概要
JavaでFirefoxDriverを使ってブラウザ起動しようとしたところタイトルのエラーが出て起動しなかった
エラーの詳細は以下
エラー詳細
org.openqa.selenium.WebDriverException: Failed to connect to binary FirefoxBinary(C:\Program Files (x86)\Mozilla Firefox\firefox.exe) on port 7055; process output follows:
10570639060 addons.xpi DEBUG Skipping unavailable install location app-system-share
1410570639061 addons.xpi INFO Mapping {972ce4c6-7e08-4474-a285-3208198ce6fd} to C:\Program Files (x86)\Mozilla Firefox\browser\extensions\{972ce4c6-7e08-4474-a285-3208198ce6fd}
1410570639061 addons.xpi INFO Mapping fxdriver@googlecode.com to C:\Users\username\AppData\Local\Temp\anonymous6771863948985799219webdriver-profile\extensions\fxdriver@googlecode.com
1410570639062 addons.xpi DEBUG Ignoring file entry whose name is not a valid add-on ID: C:\Users\username\AppData\Local\Temp\anonymous6771863948985799219webdriver-profile\extensions\webdriver-staging
1410570639062 addons.xpi DEBUG checkForChanges
1410570639068 addons.xpi DEBUG Directory state JSON differs: cache [] state [{"name":"app-global","addons":{"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"descriptor":"C:\\Program Files (x86)\\Mozilla Firefox\\browser\\extensions\\{972ce4c6-7e08-4474-a285-3208198ce6fd}","mtime":1410549501858,"rdfTime":1410549501670}}},{"name":"app-profile","addons":{"fxdriver@googlecode.com":{"descriptor":"C:\\Users\\username\\AppData\\Local\\Temp\\anonymous6771863948985799219webdriver-profile\\extensions\\fxdriver@googlecode.com","mtime":1410570638589,"rdfTime":1410570638500}}}]
1410570639072 addons.xpi-utils DEBUG Opening XPI database C:\Users\username\AppData\Local\Temp\anonymous6771863948985799219webdriver-profile\extensions.json
1410570639073 addons.xpi DEBUG New add-on fxdriver@googlecode.com installed in app-profile
*** Blocklist::_loadBlocklistFromFile: blocklist is disabled
1410570639254 addons.xpi-utils DEBUG Make addon app-profile:fxdriver@googlecode.com visible
1410570639256 DeferredSave.extensions.json DEBUG Save changes
1410570639256 DeferredSave.extensions.json DEBUG Save changes
1410570639256 addons.xpi DEBUG New add-on {972ce4c6-7e08-4474-a285-3208198ce6fd} installed in app-global
1410570639259 addons.xpi-utils DEBUG Make addon app-global:{972ce4c6-7e08-4474-a285-3208198ce6fd} visible
1410570639259 DeferredSave.extensions.json DEBUG Save changes
1410570639259 DeferredSave.extensions.json DEBUG Save changes
1410570639265 addons.xpi DEBUG Updating database with changes to installed add-ons
1410570639265 addons.xpi-utils DEBUG Updating add-on states
1410570639265 addons.xpi-utils DEBUG Writing add-ons list
1410570640188 DeferredSave.extensions.json DEBUG Starting timer
1410570640222 addons.manager DEBUG shutdown
1410570640225 DeferredSave.extensions.json DEBUG Starting write
1410570640225 addons.xpi DEBUG shutdown
1410570640226 addons.xpi-utils DEBUG shutdown
1410570640312 DeferredSave.extensions.json DEBUG Write succeeded
1410570640312 addons.xpi-utils DEBUG XPI Database saved, setting schema version preference to 16
1410570640312 addons.xpi DEBUG Notifying XPI shutdown observers
1410570640314 addons.manager DEBUG Async provider shutdown done
1410570641494 addons.manager DEBUG Loaded provider scope for resource://gre/modules/addons/XPIProvider.jsm: ["XPIProvider"]
1410570641496 addons.manager DEBUG Loaded provider scope for resource://gre/modules/LightweightThemeManager.jsm: ["LightweightThemeManager"]
1410570641499 addons.xpi DEBUG startup
1410570641499 addons.xpi DEBUG Skipping unavailable install location app-system-local
1410570641500 addons.xpi DEBUG Skipping unavailable install location app-system-share
1410570641500 addons.xpi INFO Mapping {972ce4c6-7e08-4474-a285-3208198ce6fd} to C:\Program Files (x86)\Mozilla Firefox\browser\extensions\{972ce4c6-7e08-4474-a285-3208198ce6fd}
1410570641501 addons.xpi INFO Mapping fxdriver@googlecode.com to C:\Users\username\AppData\Local\Temp\anonymous6771863948985799219webdriver-profile\extensions\fxdriver@googlecode.com
1410570641501 addons.xpi DEBUG Ignoring file entry whose name is not a valid add-on ID: C:\Users\username\AppData\Local\Temp\anonymous6771863948985799219webdriver-profile\extensions\webdriver-staging
1410570641501 addons.xpi DEBUG checkForChanges
1410570641509 addons.xpi DEBUG No changes found
*** Blocklist::_preloadBlocklistFile: blocklist is disabled
Build info: version: '2.39.0', revision: 'ff23eac', time: '2013-12-16 16:11:15'
System info: host: 'WINDOWS-3RKIT3N', ip: 'xxx.xxx.xxx.xxx', os.name: 'Windows Server 2008 R2', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_51'
Driver info: driver.version: FirefoxDriver
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:130) ~[fndb_main_rank_getter.jar:?]
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:250) ~[fndb_main_rank_getter.jar:?]
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:110) ~[fndb_main_rank_getter.jar:?]
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:197) ~[fndb_main_rank_getter.jar:?]
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:190) ~[fndb_main_rank_getter.jar:?]
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:186) ~[fndb_main_rank_getter.jar:?]
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:103) ~[fndb_main_rank_getter.jar:?]
at fndb.amazonapi.HTMLCreator.updateRanking(HTMLCreator.java:197) [fndb_main_rank_getter.jar:?]
at fndb.main.MainRankGetter.create(MainRankGetter.java:68) [fndb_main_rank_getter.jar:?]
at fndb.main.MainRankGetter.main(MainRankGetter.java:48) [fndb_main_rank_getter.jar:?]
Caused by: org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
環境
- Windows 2008 R2
- Java 1.7.0_51-b13
- Selenium Driver 2.39.0
対処方法
SeleniumのJarのバージョンをアップデートするだけ
http://www.seleniumhq.org/download/ にアクセスして
Selenium Server (formerly the Selenium RC Server)から
selenium-server-standalone-2.43.0.jar
Selenium Client & WebDriver Language Bindings のJavaから
selenium-java-2.43.0.jar
をダウンロードしクラスパスに通せばOKです
Seleniumはブラウザがバージョンアップするたびにバージョンアップするのでこの辺ついていくのが面倒ですね
Mavenでもバージョンの部分を書き換える必要があるので結局作業が必要になっちゃいますね
0 件のコメント:
コメントを投稿