1

C#+ Selenium WebDriverのオートメーションテストを行っています。私は問題に固執した、IE11のテストは動作しませんが、Firefox、Chrome、IE10で動作します。 IE11ではセレンテストが動作しません

問題は、コードの次の部分である:VS2015のデバッガから

try 
    { 
     (new WebDriverWait(driver, TimeSpan.FromMilliseconds(PAGELOAD_DELAY))). 
      Until(driver1 => ((IJavaScriptExecutor)driver). 
       ExecuteScript("return document.readyState").Equals("complete")); 
    } 
    catch (WebDriverTimeoutException ex1) 

エラー:

VS2015 debug error

私は、次を試してみたが、それは

    を助けにはなりませんでした
  • すべての場所でIE11保護モードをオフ/オンにする
  • レジストリに追加[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_DISABLE_INTERNAL_SECURITY_MANAGER]、セレンWDの[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE]
  • 異なるバージョンIE11 webdriverをの
  • 両方のx32およびx64バージョン
  • Microsoft IE11 WebDriver

私のテスト環境:2015

  • VisualStudioを

    • のWindows 8.1のx64
    • セレンwebdriverを3.0.0ベータ2
    • IEDriverServerのWin32 2.53.1
    • NUnitの3.4.1

    UPD1

    1. "互換性ビューリスト"
    2. しようとしたアドオンのWebサイト
    3. 試着this solution
    4. 試着this solution

    なしの結果、同じエラー

    UPD2

    私はIE11のドライバをチェックするために単純なプロジェクトを作成しました。コードは次です:Googleと

    [TestMethod] 
        public void TestMethod1() 
        { 
         IWebDriver driver = new InternetExplorerDriver(); 
         driver.Navigate().GoToUrl("http://google.com"); 
         try 
         { 
          (new WebDriverWait(driver, TimeSpan.FromMilliseconds(10000))). 
          Until(ExpectedConditions.VisibilityOfAllElementsLocatedBy(By.Name("q"))); 
         } 
         catch (WebDriverTimeoutException ex) 
         { } 
         driver.FindElement(By.Name("q")).SendKeys("123"); 
        } 
    

    ページをオープンしましたが、私は、デバッグ中にエラーを持っている:

    Result StackTrace: 
        at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse) 
         at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) 
         at OpenQA.Selenium.Remote.RemoteWebDriver.FindElement(String mechanism, String value) 
         at OpenQA.Selenium.Remote.RemoteWebDriver.FindElementByName(String name) 
         at OpenQA.Selenium.By.<>c__DisplayClassa.<Name>b__8(ISearchContext context) 
         at OpenQA.Selenium.By.FindElement(ISearchContext context) 
         at OpenQA.Selenium.Remote.RemoteWebDriver.FindElement(By by) 
         at UnitTestProject1.UnitTest1.TestMethod1() in C:\dev\VS2015\Projects\UnitTestProject1\UnitTestProject1\UnitTest1.cs:line 21 
        Result Message: 
        Test method UnitTestProject1.UnitTest1.TestMethod1 threw exception: 
        OpenQA.Selenium.NoSuchElementException: Unable to find element with name == q 
    

    は、IE11の下でSeleniumテストを実行するための任意の可能性があり、またはそれのドライバが完全に壊れました?テストプロジェクトから

    構成:

    • のVisualStudio 2015
    • Nuget Selenium.WebDriver 2.53.1
    • Nuget Selenium.Support 2.53。1
    • Nuget Selenium.WebDriver.IEDriver 2.53.1.1
  • 答えて

    0

    ブラウザ

    マイクロソフトのエッジのエミュレーションモードを確認してください? IE 11?

    IE 11に設定します。

    +0

    デフォルトモードはエッジです。すべてのセッションでIE11のデフォルトモードを変更することはできません。たぶん、コードからセットアップすることは可能ですが、わかりません。私は自分のWebサイトを "Compatibility view list"に追加しました。そのため、サイトはIE7モードで開く必要があります。しかし、私は同じエラーを持っています。 –

    関連する問題