title: SELENIUM ACCESSIBILITY TESTING
body: <p>I have downloaded the latest rcx file and added the extension in the chrome options.</p>
  
  <p>The First step is executed fine. In the second step it is executed till driver.Navigate().GoToUrl("chrome://extensions-frame/");</p>
  
  <p>For the next step it throws this error </p>
  
  <pre><code>"OpenQA.Selenium.NoSuchElementException
  HResult=0x80131500
  Message=no such element: Unable to locate element: {"method":"xpath","selector":"//a[@class='extension-commands-config']"}
  (Session info: chrome=68.0.3440.106)
  (Driver info: chromedriver=2.41.578737 (49da6702b16031c40d63e5618de03a32ff6c197e),platform=Windows NT 10.0.17134 x86_64)
  Source=WebDriver
  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.FindElementByXPath(String xpath)
  at OpenQA.Selenium.By.&lt;&gt;c__DisplayClass19_0.&lt;xpath&gt;b__0(ISearchContext context)
  at OpenQA.Selenium.By.FindElement(ISearchContext context)
  at OpenQA.Selenium.Remote.RemoteWebDriver.FindElement(By by)
  at Exsilio.QA.Test.DKNAccessabilityTest.AccessabilityTest() in C:\Trilok\Projects\Code\Automation Testing\RealTimeDataUpdate\QualityAssurance\Exsilio.QA.Test\DKNAccessabilityTest.cs:line 40"
  </code></pre>
  
  <p>I am using the "extension_1_0_9_0.crx" as current extension.</p>
  
  <p>Please do the need full.</p>
  
  <p>My code is as below :</p>
  
  <pre><code>[TestInitialize]
          public void Init()
          {
              //Open ChromeDriver with appropriate extension enabled
              ChromeOptions options = new ChromeOptions();
              options.AddExtension("../Extension/extension_1_0_9_0.crx");
              driver = Driver.Initalize&lt;ChromeDriver&gt;(options);
          }
      [TestMethod]
      public void AccessabilityTest()
      {
          // 2 - setup key shortcut for extension
          driver.Navigate().GoToUrl("chrome://extensions-frame/");
          driver.FindElement(By.XPath("//a[@class='extension-commands-config']"))
              .Click();
          driver.FindElement(By.XPath("//span[@class='command-shortcut-text']"))
              .SendKeys(Keys.Control + "m");
          driver.FindElement(By.Id("extension-commands-dismiss"))
              .Click();
  
          // 3
          driver.Navigate().GoToUrl("http://www.google.pl");
          // 4 - open WAVE extension 
          new Actions(driver).KeyDown(Keys.Control).SendKeys("m").Build().Perform();
  
          // 5
          var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10));
          wait.Until(ExpectedConditions.ElementExists(By.ClassName("wave5icon")));
  
          // 6
          var waveTips = driver.FindElements(By.ClassName("wave5icon"));
          if (waveTips.Count == 0) Assert.Fail(
              "Could not locate any WAVE validations - " +
              "please ensure that WAVE is installed correctly");
          foreach (var waveTip in waveTips)
          {
              if (!waveTip.GetAttribute("alt").StartsWith("ERROR")) continue;
  
              var fileName = String.Format("{0}{1}{2}",
                  "WAVE", DateTime.Now.ToString("HHmmss"), ".png");
              var screenShot = ((ITakesScreenshot)driver).GetScreenshot();
              //screenShot.SaveAsFile(
              //    Path.Combine(System.IO.Path.GetTempPath(), fileName), ImageFormat.Png);
              driver.Close();
              Assert.Fail(
                  "WAVE errors were found on the page. Please see screenshot for details");
              Assert.IsTrue(false, "One or more of the functionality tests failed : WAVE errors were found on the page. Please see screenshot for details");
          }
  
          //Assert.IsTrue(isAllPass, "One or more of the functionality tests failed");
      }
  </code></pre>