title: Pass value to xpath at runtime
body: <p><strong>Please read the whole Q before disliking or commenting something. I have searched on internet before posting it here.</strong> I'm having the below project structure.</p>
  
  <pre><code>pages(package)
      &gt; Homepage.java
  test(package)
      &gt; Flipkart.java 
  </code></pre>
  
  <p>Inside <strong>Homepage.java</strong> i have declared all the WebElements using <strong>POM Page Factory methods</strong> and created <strong>respective method to click on Electronics link.</strong></p>
  
  <pre><code>@FindBy(xpath = '//input[@title='Electronics']')
  private WebElement lnkElectronics;
  </code></pre>
  
  <p>Inside <strong>Fipkart.java</strong> I'm calling the <strong>Electronics click method</strong>.</p>
  
  <p>My doubt over here is the declared WebElement is specifically for Electronics.</p>
  
  <p><strong>Is there a way i can create a WebElement with type like mentioned below and pass value for %s dynamically from main method?</strong></p>
  
  <pre><code>@FindBy(xpath = '//input[@title='%s']')
  private WebElement lnkElectronics;
  </code></pre>