title: WebElement is an interface - how can methods be called on it successfully?
body: <p>Since WebElement is an interface, it means that all the methods present in the WebElement interface are abstract, i.e. they don't have a body. Also, we know that we cannot access the methods of the interface directly using reference to the interface (because the methods don't have any implementation)</p>
  
  <p>Now, consider the following code:</p>
  
  <pre><code>WebElement button = driver.findElement(//xpath of a button);
  button.click();
  </code></pre>
  
  <p>Can someone explain how is it possible here to access the click() method of the interface WebElement through 'button' which is nothing but a reference to the interface WebElement?</p>