2016-10-05 4 views
1

私はセレンの自動化に取り組んでいます。今日私はpomファイルを最新の依存関係に更新しました。Webdriver 3.0.0-beta3がブラウザと対話できない

<dependency> 
     <groupId>org.seleniumhq.selenium</groupId> 
     <artifactId>selenium-java</artifactId> 
     <version>3.0.0-beta3</version> 
    </dependency> 
    <dependency> 
     <groupId>org.seleniumhq.selenium</groupId> 
     <artifactId>selenium-firefox-driver</artifactId> 
     <version>3.0.0-beta3</version> 
    </dependency> 

この後、私のテストはブラウザ上で実行されていません。 Firefoxがバージョン48になっていて、それが開きますが、Webdriverがブラウザと対話していないとします。私が取得エラーログは次のとおりです。

org.openqa.selenium.WebDriverException: Failed to connect to binary FirefoxBinary 
(C:\Program Files (x86)\Mozilla Firefox\firefox.exe) on port 7055; process output follows: 
,"syncGUID":"Ei_LbuNEIU60","location":"app-global","version":"48.0.2","type":"theme","internalName":"classic/1.0", 
"updateURL":null,"updateKey":null,"optionsURL":null,"optionsType":null,"aboutURL ":null,"icons": {"32":"icon.png","48":"icon.png"},"iconURL":null,"icon64URL":null, 
"defaultLocale":{"name":"Default","description":"The default theme.","creator":"Mozilla","homepageURL":null,"contributors":["Mozilla Contributors"]},"visible":true,"active":true,"userDisabled":false,"appDisabled":false,"descriptor":"C:\\Program Files (x86)\\Mozilla Firefox\\browser\\extensions\\{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi","installDate":1475694945987,"updateDate":1475694945987,"applyBackgroundUpdates":1,"skinnable":true,"size":21905,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"strictCompatibility":true,"locales":[],"targetApplications":[{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"48.0.2","maxVersion":"48.0.2"}],"targetPlatforms":[],"seen":true} 

これは私が今朝になっています新しいエラーである64ビットマシン上で32ビットにJREとJDKを変更した後

org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output: 
,"syncGUID":"qLUZlH20Y8gq","location":"app-global","version":"48.0.2","type":"theme","internalName":"classic/1.0","updateURL":null,"updateKey":null,"optionsURL":null,"optionsType":null,"aboutURL":null,"icons":{"32":"icon.png","48":"icon.png"},"iconURL":null,"icon64URL":null,"defaultLocale":{"name":"Default","description":"The default theme.","creator":"Mozilla","homepageURL":null,"contributors":["Mozilla Contributors"]},"visible":true,"active":true,"userDisabled":false,"appDisabled":false,"descriptor":"C:\\Program Files (x86)\\Mozilla Firefox\\browser\\extensions\\{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi","installDate":1475694945987,"updateDate":1475694945987,"applyBackgroundUpdates":1,"skinnable":true,"size":21905,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"strictCompatibility":true,"locales":[],"targetApplications":[{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"48.0.2","maxVersion":"48.0.2"}],"targetPlatforms":[],"seen":true} 
1475767803924 addons.xpi DEBUG getModTime: Recursive scan of {972ce4c6-7e08-4474-a285-3208198ce6fd} 

答えて

2

これはSelenium3間の非互換性の問題ですMozilla Firefoxバージョン。

Selenium3は、実行可能なgeckodriverを起動してMozilla Firefox >= v47を他のドライバと同様に起動できます。

To work around you need to download latest executable geckodriver and extract downloaded zip into your system at any locationとは、以下のようにダウンロード実行geckodriver場所で指すようにwebdriver.gecko.driverSyetemプロパティを設定します。 - 私はまた、追加の所望の能力capabilities.setCapability(「マリオネット」、true)を以前のヤモリのドライバを追加した

System.setProperty("webdriver.gecko.driver", "path/to/geckodriver"); 

WebDriver driver = new FirefoxDriver(); 
+0

。私の同僚は自分のマシンでうまく動作している32ビットにjreを変更するように頼んだ。私はそれをやったが、今は違うエラーになっている。 – ChanChow

+0

クロムについては、ブラウザを起動してurlを渡し、要素と対話しません。それは失敗する – ChanChow

+0

別のエラーを共有することができますか? –

関連する問題