All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ru.yandex.qatools.actions.beans.AbstractResizeWindowAction Maven / Gradle / Ivy

The newest version!
package ru.yandex.qatools.actions.beans;

import org.openqa.selenium.Dimension;
import org.openqa.selenium.WebDriver;

/**
 * author Pavel Zorin
 * [email protected]
 */
public abstract class AbstractResizeWindowAction extends WebDriverAction {

    public abstract int getWidth();

    public abstract int getHeight();

    @Override
    public void perform(WebDriver webDriver) {
        webDriver.manage().window().setSize(new Dimension(getWidth(), getHeight()));
    }

    @Override
    public String toString() {
        return String.format("Resizing browser window to (%d:%d).", getWidth(), getHeight());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy