2015-07-20 88 views
0

IISExpress 10(webengine4.dll)中的「訪問衝突讀取位置」我的配置如下。 XUnit亞軍(1.9.2)發射使用SpecFlow生成的測試。 IISExpress 10點開始在單像這樣:使用Selenium IEDriver 12.6

_iisProcess = new Process { 
    StartInfo = { 
     FileName = Path.Combine(programFiles, @"IIS Express\iisexpress.exe") 
     } 
    }; 
var applicationPath = GetApplicationPath(); 
_iisProcess.StartInfo.Arguments = string.Format(
    "/path:{0} /port:{1} /systray:false /trace:e", 
    applicationPath, 
    IisPort); // so far 9090 
_iisProcess.Start(); 

硒IEDriverServer.exe(2.46),被配置爲這樣:

_driver = new InternetExplorerDriver(
    new InternetExplorerOptions(){EnsureCleanSession = true}); 

配置爲每this guide的機器。 IEDriverServer.exe監聽17923端口。

在測試中的某些點IISExpress失敗,出現「訪問衝突」(c0000005)錯誤。實際的失敗系統測試各不相同,但看起來像是在有一些活動的UI交互時發生。有SignalR,動態內容和其他。該問題簽名:

Problem Event Name: APPCRASH 
    Application Name: iisexpress.exe 
    Application Version: 10.0.10046.0 
    Application Timestamp: 55121079 
    Fault Module Name: webengine4.dll 
    Fault Module Version: 4.6.57.0 
    Fault Module Timestamp: 551b8b21 
    Exception Code: c0000005 
    Exception Offset: 00066ccf 
    OS Version: 6.3.9600.2.0.0.256.48 
    Locale ID: 1049 
    Additional Information 1: 5861 
    Additional Information 2: 5861822e1919d7c014bbb064c64908b2 
    Additional Information 3: a10f 
    Additional Information 4: a10ff7d2bb2516fdc753f9c34fc3b069 

有時在這樣的代碼以「OpenQA.Selenium.WebDriverTimeoutException:30秒後超時」未能在DefaultWait.Until

 IWait<IWebDriver> wait = new WebDriverWait(driver, TimeSpan.FromSeconds(30.00)); 
     try 
     { 
      wait.Until(driver1 => ((IJavaScriptExecutor)driver).ExecuteScript("return document.readyState").Equals("complete")); 
     } 
     catch (InvalidOperationException ex) // js error { /*...*/ } 

IISExpress日誌也於事無補。它僅寫入一些最後的請求並終止:

Request started: "POST" http://localhost:9090/signalr/abort?transport=webSockets... 
Request ended: http://localhost:9090/signalr/connect?transport=webSockets... with HTTP status 101.0 
Request ended: http://localhost:9090/signalr/abort?transport=webSockets&clientProtocol=1.4.... with HTTP status 200.0 
WriteCompletedInline 
Action = 00000002 
Action = 00000000 
Request ended: http://localhost:9090/signalr/connect?transport=webSockets.... with HTTP status 101.0 
Request ended: http://localhost:9090/BotDetectCaptcha.ashx?get=image&c=SampleCaptcha&t=44c45e60afac46809bfce16e123b54a2 with HTTP status 200.0 

如果測試在管理員下運行,它不起作用。 R#測試跑步者射擊測試時也是如此。

任何你的想法,幫助將不勝感激。謝謝!

回答

0

萬一它會幫助某人,它幫助我通過重新安裝IIS Express來解決問題。可以在here找到IIS Express 8.0 MSI文件。