Package org.openqa.selenium.interactions
Interface Coordinates
-
public interface Coordinates
Provides coordinates of an element for advanced interactions. Note that some coordinates (such as screen coordinates) are evaluated lazily since the element may have to be scrolled into view.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Object
getAuxiliary()
Point
inViewPort()
Gets coordinates on the element relative to the top-left corner of OS-window being used to display the content.Point
onPage()
Gets coordinates on the element relative to the top-left corner of the page.Point
onScreen()
Gets coordinates on the element relative to the top-left corner of the monitor (screen).
-
-
-
Method Detail
-
onScreen
Point onScreen()
Gets coordinates on the element relative to the top-left corner of the monitor (screen). This method automatically scrolls the page and/or frames to make element visible in viewport before calculating its coordinates.- Returns:
- coordinates on the element relative to the top-left corner of the monitor (screen).
- Throws:
ElementNotInteractableException
- if the element can't be scrolled into view.
-
inViewPort
Point inViewPort()
Gets coordinates on the element relative to the top-left corner of OS-window being used to display the content. Usually it is the browser window's viewport. This method automatically scrolls the page and/or frames to make element visible in viewport before calculating its coordinates.- Returns:
- coordinates on the element relative to the top-left corner of the browser window's viewport.
- Throws:
ElementNotInteractableException
- if the element can't be scrolled into view.
-
onPage
Point onPage()
Gets coordinates on the element relative to the top-left corner of the page.- Returns:
- coordinates on the element relative to the top-left corner of the the page.
-
getAuxiliary
java.lang.Object getAuxiliary()
-
-