2014-02-16 89 views
0
頁面

錯誤(S)是Chrome瀏覽器中打開,但不會去

C:\Users\kclarke\workspace\Watir>cucumber features 
*** WARNING: You must use ANSICON 1.31 or higher (https://github.com/adoxa/ansicon/) to get coloured output on Windows 
Starting ChromeDriver (v2.4.226107) on port 9515 
[5988:6436:0216/144720:ERROR:gpu_info_collector_win.cc(146)] Could not read gaming score from assessment results. 
[5988:6436:0216/144720:ERROR:chrome_views_delegate.cc(176)] NOT IMPLEMENTED 
[5988:6436:0216/144720:ERROR:desktop_root_window_host_win.cc(746)] NOT IMPLEMENTED 
[2636:7124:0216/144735:ERROR:ipc_channel_win.cc(405)] pipe error: 232 
unknown error: Chrome failed to start: exited normally 
    (Driver info: chromedriver=2.4.226107,platform=Windows NT 6.1 SP1 x86_64) (Selenium::WebDriver::Error::UnknownError) 
C:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.38.0/lib/selenium/webdriver/remote/response.rb:51:in `assert_ok' 
C:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.38.0/lib/selenium/webdriver/remote/response.rb:15:in `initialize' 
C:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.38.0/lib/selenium/webdriver/remote/http/common.rb:59:in `new' 
C:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.38.0/lib/selenium/webdriver/remote/http/common.rb:59:in `create_response' 
C:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.38.0/lib/selenium/webdriver/remote/http/default.rb:66:in `request' 
C:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.38.0/lib/selenium/webdriver/remote/http/common.rb:40:in `call' 
C:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.38.0/lib/selenium/webdriver/remote/bridge.rb:634:in `raw_execute' 
C:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.38.0/lib/selenium/webdriver/remote/bridge.rb:99:in `create_session' 
C:/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.38.0/lib/selenium/webdriver/remote/bridge.rb:68:in `initialize' 

Chrome的驅動程序安裝路徑(版本v2.4.226107):C:\Ruby200\bin;C:\Users\kclarke\workspace\bin

我的代碼如下所示:

require 'rubygems' 
require 'watir-webdriver' 

#@browser = Watir::Browser.new :firefox 
@browser = Watir::Browser.new :chrome 
#@browser = Watir::Browser.new :ie 
@browser.goto 'http:XXXXXXXXXXXXXXXXX' 
+0

我添加了執行的整個輸出。 – KWC

+0

我正在使用Chrome:版本32.0.1700.107 m – KWC

+0

沒有。這是我的初始設置。我花了好幾天的時間來解決這個問題。 – KWC

回答

1

首先,這有沒有關係錯誤PATH,因爲顯然可以從消息看,ChromeDriver可以成功啓動。

那麼我會建議先升級你的ChromeDriver,然後再做任何事情,因爲你的版本過時了。從更新日誌here,2.4版本是5個月,最新的是2.9,它支持Chrome 31-34。 (2.4版聲稱支持Chrome 32,但Chrome 32.0.1700.107 m現在是最新版本,而不是ChromeDriver 2.4發佈時的最新版本。)

+0

我下載並添加了版本2.9的鉻驅動程序。 Ran輸出低於..... – KWC

+0

C:/Users/kclarke/workspace/Watir/features/support/env.rb:24:在中:undefined method close nil:NilClass(NoMethodError) C:\ Users \ kclarke \ workspace \ Watir> [5260:5264:0216/182235:ERROR:desktop_root_window_host_win.cc(746)] NOT IMPLEMENTED – KWC

+0

第一個錯誤是您的代碼有問題'env.rb:24',請張貼。第二個錯誤只是ChromeDriver的日誌記錄,不用擔心。 –

相關問題