title: How to initialize FindsBy in page factory when the Object IDs are dynamic
body: <p>I have this code for my IDs:</p>
  
  <pre><code>public int counter = 0;
  public void AddClick(){
  counter = counter + 1;
   driver.FindElement(By.Id(String.Format("btnAdd{0}_btnAddExpense", counter))).Click();
   Console.WriteLine("I am clicked {0} times!", counter);
  }
  </code></pre>
  
  <p>How do I declare this in my FindsBy? Apparently, this doesn't work:</p>
  
  <pre><code> [FindsBy(How = How.Id, Using = "(String.Format("btnAdd{0}_btnAddExpense", counter")]
   public IWebElement contactBox { get; set; }
  </code></pre>