title: How to get the x, y coordinates of an element in a web page?
body: <p>I am using Selenium WebDriver and coding in Java. In a code I need to scroll down to a specific element in the web page for clicking it. I am using JavascriptExecutor command. My question is how will I get to know the exact x and y coordinates of that specific element as per the position of it in the web page. The syntax of the code I am using is given below:</p>
  
  <pre><code>JavascriptExecutor jse = (JavascriptExecutor) driver;
  jse.executeScript("scroll(x,y)");
  </code></pre>
  
  <p>In the second line of the above code I need to give the specific values for the x and y coordinates of the element I want to click.</p>