Getting an ‘An unhandled exception of type ‘OpenQA.Selenium.NoSuchElementException’ occurred in WebDriver.dll’ when trying to write a C# logout test

Having trouble finding the correct element to use to write a selenium test to logout of web app.

<li class=”dropdown toolbar-icon-bg open>

<a class=”dropdown-toggle data-toggle=”dropdown aria-expanded=”true onclick=”angular.element(‘[ng-app]’).injector().get(‘googleAnalyticsSvc’).triggerEvent(‘Interface’, ‘Top Nav’, ‘Logout Expand’);>

<span class=”icon-bg>

<i class=”ti ti-user></i>

<ul class=”dropdown-menu userinfo arrow>


<a href=”/Home/LogOut onclick=”angular.element(‘[ng-app]’).injector().get(‘googleAnalyticsSvc’).triggerEvent(‘Interface’, ‘Top Nav’, ‘Logout’);>

<i class=”ti ti-user></i>
<span>Log Out</span>
Default Asked on April 28, 2017 in Selenium WebDriver.
Add Comment
  • 0 Answer(s)
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.