How to get the x, y-axis location of the view itself in selenium?

I know I can get the position of a specific element. But I can't find a way to get the coordinate of the window's view itself. So I can see it change as a scrolling/click action in the page happened.

Are there ways to do that in Selenium?

I uses wd.js


I am using the below snippet:

Point point = element.getLocation();

int x_co_ordinate = point.getX();
int y_co_ordinate = point.getY();

System.out.print(x_co_ordinate + ", " + y_co_ordinate);
  • it's more about view rather than the element itself. thanks – Ezeewei Dec 20 '16 at 16:42

Not the answer you're looking for? Browse other questions tagged or ask your own question.