title: How to click on navigation bar using selenium web driver
body: <p>I Want to  click on navigation bar using selenium web driver</p>
  
  <p>My Html code is</p>
  
  <pre><code>&lt;div class="navbar-inner"&gt;
              &lt;div class="container"&gt;
              &lt;a class="navbar-brand " ui-sref="home" href="#/"&gt;&lt;i class="glyphicon glyphicon-home"&gt;&lt;/i&gt; iWatch Project&lt;/a&gt;
              &lt;div class="navbar-header"&gt;
                  &lt;button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-navbar-collapse-1" aria-expanded="false"&gt;
                      &lt;span class="sr-only"&gt;Toggle navigation&lt;/span&gt;
                      &lt;span class="icon-bar"&gt;&lt;/span&gt;
                      &lt;span class="icon-bar"&gt;&lt;/span&gt;
                      &lt;span class="icon-bar"&gt;&lt;/span&gt;
                  &lt;/button&gt;
              &lt;/div&gt;
              &lt;div class="navbar-collapse collapse ng-scope" id="bs-navbar-collapse-1" data-ng-controller="uiUserNavigationController"&gt;
                  &lt;ul class=" nav navbar-nav"&gt;
                      &lt;li data-ng-hide="!userInfo.isAuthenticated || !isPlanner" class="ng-hide"&gt;&lt;a ui-sref="contractList" href="#/contract"&gt;&lt;i class="glyphicon glyphicon-plus"&gt;&lt;/i&gt; Contract Information&lt;/a&gt;&lt;/li&gt;
                      &lt;li data-ng-hide="!userInfo.isAuthenticated || !isPlanner" class="ng-hide"&gt;&lt;a ui-sref="civilList" href="#/civil"&gt;&lt;i class="glyphicon glyphicon-plus"&gt;&lt;/i&gt; Civil &lt;/a&gt;&lt;/li&gt;
                      &lt;li data-ng-hide="!userInfo.isAuthenticated || !isPlanner" class="ng-hide"&gt;&lt;a ui-sref="emList" href="#/em"&gt;&lt;i class="glyphicon glyphicon-plus"&gt;&lt;/i&gt; E&amp;amp;M &lt;/a&gt;&lt;/li&gt;
                      &lt;li data-ng-hide="!userInfo.isAuthenticated || !isPlanner" class="ng-hide"&gt;&lt;a ui-sref="safetyList" href="#/safety"&gt;&lt;i class="glyphicon glyphicon-plus"&gt;&lt;/i&gt; Safety &lt;/a&gt;&lt;/li&gt;
                      &lt;li data-ng-hide="!userInfo.isAuthenticated || !isPlanner" class="ng-hide"&gt;&lt;a ui-sref="workOrderList" href="#/workOrder"&gt;&lt;i class="glyphicon glyphicon-plus"&gt;&lt;/i&gt; Utility Diversion &lt;/a&gt;&lt;/li&gt;
                      &lt;li data-ng-hide="!userInfo.isAuthenticated || !isPlanner" class="ng-hide"&gt;&lt;a ui-sref="iPadView" href="#/iPadView"&gt;&lt;i class="glyphicon glyphicon-plus"&gt;&lt;/i&gt; iPad View&lt;/a&gt;&lt;/li&gt;
                      &lt;li class="dropdown ng-hide" data-ng-hide="!userInfo.isAuthenticated"&gt;
                          &lt;a class="btn dropdown-toggle ng-binding" href="#" aria-haspopup="true" aria-expanded="false"&gt;
                              Hi, &lt;i class="glyphicon glyphicon-user"&gt;&lt;/i&gt;  !
                          &lt;/a&gt;
                          &lt;ul class="dropdown-menu"&gt;
                              &lt;li data-ng-hide="!userInfo.isAuthenticated" class="ng-hide"&gt;&lt;a ui-sref="user.intray" href="#/user/intray"&gt;&lt;i class="glyphicon glyphicon-tasks"&gt;&lt;/i&gt; My Tasks&lt;/a&gt;&lt;/li&gt;
                              &lt;li data-ng-hide="!userInfo.isAuthenticated || !isPlanner" class="ng-hide"&gt;&lt;a ui-sref="requestAccess.CV" href="#/requestAccess/CV"&gt;&lt;i class="glyphicon glyphicon-eye-open"&gt;&lt;/i&gt; Request Access&lt;/a&gt;&lt;/li&gt;
                              &lt;li data-ng-hide="!userInfo.isAuthenticated" class="ng-hide"&gt;&lt;a ui-sref="userChangePassword" href="#/changepassword"&gt;&lt;i class="glyphicon glyphicon-lock"&gt;&lt;/i&gt; Change Password&lt;/a&gt;&lt;/li&gt;
                              &lt;!--&lt;li data-ng-hide="!userInfo.isAuthenticated"&gt;&lt;a ui-sref="userSettings"&gt;&lt;i class="glyphicon glyphicon-edit"&gt;&lt;/i&gt; User Settings&lt;/a&gt;&lt;/li&gt;--&gt;
                              &lt;li data-ng-hide="!userInfo.isAuthenticated" class="ng-hide"&gt;&lt;a ui-sref="userClaims" href="#/userClaims"&gt;&lt;i class="glyphicon glyphicon-wrench"&gt;&lt;/i&gt; User Claims&lt;/a&gt;&lt;/li&gt;
                              &lt;li data-ng-hide="!userInfo.isAuthenticated" class="ng-hide"&gt;&lt;a href="" data-ng-click="logOut()"&gt;&lt;i class="glyphicon glyphicon-log-out"&gt;&lt;/i&gt; Logout&lt;/a&gt;&lt;/li&gt;
                          &lt;/ul&gt;
                      &lt;/li&gt;
                      &lt;li data-ng-hide="userInfo.isAuthenticated" class=""&gt;&lt;a href="" data-ng-click="LogIn()"&gt;&lt;i class="glyphicon glyphicon-log-in"&gt;&lt;/i&gt; Login&lt;/a&gt;&lt;/li&gt;
                  &lt;/ul&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;/div&gt;
  </code></pre>
  
  <p>I want to click on the marked part from selenium.</p>
  
  <pre><code>**&lt;a href="" data-ng-click="LogIn()"&gt;**
  </code></pre>
  
  <p>What I tried </p>
  
  <pre><code>driverIE.findElement(By.cssSelector("a[href*=LogIn()]")).click();
  </code></pre>
  
  <p>Any help on this - would help</p>