title: How to find element in nested span using Selenium WebDriver?
body: <p>I am trying to click on 'New Trade' link which is in span n6 which is a child element of span n2. I am able to reach till n2 but its not identifying 'n6'.
  Please help I am new to Selenium WebDriver</p>
  
  <p>Here I am posting the html and my code.</p>
  
  <blockquote>
    <p>Trading&nbsp;<br></p>
    
    <p>New
    Trade&nbsp;<br></p>
    
    <p>Trade
    Explorer&nbsp;<br></p>
  </blockquote>
  
  <p>I want to click on <strong>New Trade</strong></p>
  
  <p><a href="https://i.stack.imgur.com/KP3MA.png" rel="nofollow noreferrer">HTML source code</a></p>
  
  <p>My code which went till span 'n2':</p>
  
  <pre><code>driver.switchTo().frame(driver.findElement(By.name("treeFrame")));
  
  WebElement allFormChildElements = driver.findElement(By.name("the_form"));
  allFormChildElements.findElement(By.linkText("Trading")).click();  
  
  WebElement modalDialog = allFormChildElements.findElement(By.className("border"));
  WebElement newmodalDialog = modalDialog.findElement(By.className("formScrollableMenuContent")); 
  System.out.println(newmodalDialog.findElements(By.tagName("a")).size()); // ans 5 
  
  WebElement newDialog= newmodalDialog.findElement(By.id("n2"));
  System.out.println(newDialog.findElements(By.id("n3")).size()); // ans 0
  </code></pre>