title: NoSuchElementException when using By.Xpath
body: <p>Edit :</p>
  
  <p>The element was inside an iframe, this is how it finally worked:</p>
  
  <pre><code>WebDriverWait wait = new WebDriverWait(_driver, 60);
      wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By
              .xpath("//*[@class='IFrameID']")));
  WebElement element_t = _driver.findElement(
            By.xpath("//*[@myattribute='mytest']"));
  </code></pre>
  
  <hr>
  
  <p>Edit :</p>
  
  <p>My problem seems to be the structure of the page. i tried different things, and i only was able to get the body by id, ever other element i tried to get by id or any other attribute couldnt be found...</p>
  
  <hr>
  
  <p>I am trying to get an element by using the By.xpath method, the xpath itself works just fine when used in firebug/firepath, but when used in the java application i am getting an Exception:</p>
  
  <pre><code>org.openqa.selenium.NoSuchElementException: Unable to locate element:    {"method":"xpath","selector":".//*[@myattribute='mytest']"}
  </code></pre>
  
  <p>The attribute i am trying to access is not a standard html one, but generated from a framework so the field looks like this :</p>
  
  <pre><code>&lt;input id="F_19" class="FIELDInputEdit" type="text" style=" width:100%;" maxlength="40" myattribute="mytest" name="CC"&gt;
  </code></pre>
  
  <p>The javacode itself looks like this :</p>
  
  <pre><code>WebElement element_t = _driver.findElement(
            By.xpath(".//*[@myattribute='mytest']"));
  </code></pre>
  
  <p>Since the only known attribute is this one, i have no ohter way to access the input field.
  I am using Firefox 17.0.11</p>