title: xpath identification Dynamic value passing
body: <p>the xpath</p>
  
  <pre><code>driver.findElement(By.xpath("//input[@accesskey='9']"));
  </code></pre>
  
  <p>how cound we pass the Dynamic value in the accesskey Attribute, because the accesskey Attribute assign with any integer</p>
  
  <p>so i get that id from database and try to pass that id in the accesskey attribute how using java?</p>
  
  <p>Html code</p>
  
  <pre><code>td style="width: 5%;"&gt;
  &lt;input type="checkbox" data-bind="attr: { accesskey: Id }" accesskey="6"&gt;
  &lt;/td&gt;
  &lt;td style="width: 5%;"&gt;
  &lt;input type="checkbox" data-bind="attr: { accesskey: Id }" accesskey="7"&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p>java code</p>
  
  <pre><code>public void portfolioRenewalSearch(String portfolioId) throws Exception {
  
          try {
              driver.findElement(By.xpath("//input[@accesskey= portfolioId]"))
                      .click();    
          } catch (AssertionError Ae) {
              Ae.printStackTrace();
          }
      }
  </code></pre>
  
  <p>but the above code show the Exception "selenium.NoSuchElementException"</p>