title: How to Write a Function for WebElement Click in Selenium Webdriver
body: <p>I am Having a Lot of WebElements
  For Example I Declared a WebElement a</p>
  
  <pre><code>@FindBy(id="BtnLogin")
  private WebElement btnLogin;
  </code></pre>
  
  <p>In the Same Manner I created "N" number of WebElements
  Every time I Cant use "driver.findElement()" function So I wrote a function </p>
  
  <pre><code>public static void WebElementClick(WebElement we)
  {
  we.click();
  }
  </code></pre>
  
  <p>When Ever the Control is Going to The Line we.click() in the WebElementclick Function it is Showing NullPointerException as a Result My Purpose is Failing</p>
  
  <p>I am Not Getting What to Do,Some One Please Help Me on this :)</p>