2015-10-06 59 views
3

我想在Chrome瀏覽器中運行我的specflow測試。每次運行時,出現以下錯誤:無法使用Specflow在Chrome中運行測試

Autofac.Core.DependencyResolutionException : An exception was thrown while invoking the constructor 'Void .ctor()' on type 'ChromeDriver'. ---> unknown error: unrecognized Blink revision: 3b3c00f2d95c45cca18ab944acced413fb759311 (Driver info: chromedriver=2.10.267521,platform=Windows NT 6.3 x86_64) (See inner exception for details.) ----> System.InvalidOperationException : unknown error: unrecognized Blink revision: 3b3c00f2d95c45cca18ab944acced413fb759311 (Driver info: chromedriver=2.10.267521,platform=Windows NT 6.3 x86_64) TearDown : System.NullReferenceException : Object reference not set to an instance of an object.

但是,當我爲IE運行相同的腳本時,它運行良好。只有使用Chrome驅動程序,它纔會發生錯誤。此外,每個依賴項(所有* .dlls),chromedriver.exe都是解決方案的一部分。我正在VS 2013運行我的測試。

有沒有人有這個想法可能是這個問題的癥結所在?

回答

3

今天早上我有同樣的問題。看來可能是Chrome的更新導致驅動程序不兼容。我下載並更換了最新的Chrome驅動程序here

+0

Thanks @bjones。有效 –

2

當我第一次嘗試ChromeDriver時,我也收到了錯誤消息。問題因爲使用nuget安裝ChromeDrvier。我選擇了錯的一個。當您搜索ChromeDriver時,可能有4個或5個項目具有相同的名稱。 **Select "Chromium.ChromeDrier" version 2.21.0 is work for me**

更新:我不使用Specflow。我使用視覺工作室 - 硒。但我認爲這個錯誤會相同