title: sometimes move to element and click event is not working
body: <p>I am new to selenium web driver and stuck with follows problem. I have written code for hover on Menu and click sub menu in jsp page.in this i have 3 anchor tags that are used to click and redirect to another page. </p>
  
  <p>But the problem is first and last anchors are working properly not second tag. first and last tag action can achieve. But when driver moves to seconds tag which is not respond and says Exception as "No such Element". </p>
  
  <p>How it is possible. Don't know why it doesn't move to that particular tag and trigger that.Kindly help me. Thanks in advance.</p>
  
  <pre><code>    &lt;li style="z-index:1"&gt;&lt;a href="welcome.jsp"&gt;Business&lt;/a&gt;
      &lt;ul&gt;&lt;li&gt;&lt;a href="ChainPerformance.jsp"&gt;Chain Performance&lt;/a&gt;
  &lt;li&gt;&lt;a href="TopXReport.jsp"&gt;Top X Report&lt;/a&gt;&lt;li&gt;
      &lt;a href="ChainTop.jsp"&gt;Chain Top&lt;/a&gt;&lt;li&gt;&lt;/ul&gt;&lt;/li&gt;
  </code></pre>
  
  <p>Code for mouse hover and click:</p>
  
  <pre><code>@Then ("^I hover on (.+) menu and (.+) submenu$")
              public void mousehover(String elementName,String subMenu) throws InterruptedException{
                  Actions actions = new Actions(webdriver);
                  WebElement menuHoverLink = webdriver.findElement(By.xpath("//a[text() = '" + elementName + "']"));
                  actions.moveToElement(menuHoverLink).perform();
                  Thread.sleep(2000);
                  actions.moveToElement(menuHoverLink).moveToElement(webdriver.findElement(By.xpath("//a[text() = '" + subMenu + "']")));
                  Thread.sleep(2000);
                  actions.click().perform();
                  System.out.println("Sub menu "+subMenu+" Has been clicked");
              }
  </code></pre>