WindowResizer

public class WindowResizer implements AutoCloseable

An AutoCloseable resizer for the browser. When closing, it reverts the the original state

Constructors

WindowResizer

public WindowResizer(int expectedWidth, int expectedHeight)

Resize a browser to the requested dimensions. First it changes the window size, and then it updates the size of the html inside it.

Parameters:
  • expectedWidth – expected width
  • expectedHeight – expected height

Methods

close

public void close()

Revert state

getTotalHeight

public Long getTotalHeight()

get total scrollable height of the browser

Returns:height

getTotalWidth

public Long getTotalWidth()

get total scrollable width of the browser

Returns:width

getVisibleHeight

public Long getVisibleHeight()

get visible height of the browser

Returns:height

getVisibleWidth

public Long getVisibleWidth()

get visible width of the browser

Returns:width