io.nosqlbench.driver.webdriver.verbs.SetWindowSize Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of driver-web Show documentation
Show all versions of driver-web Show documentation
A nosqlbench driver module;
Provides the ability to drive steps through the webdriver API.
package io.nosqlbench.driver.webdriver.verbs;
import io.nosqlbench.driver.webdriver.WebContext;
import org.openqa.selenium.Dimension;
public class SetWindowSize implements WebDriverVerb {
private final int width;
private final int height;
public SetWindowSize(int width, int height) {
this.width = width;
this.height = height;
}
public SetWindowSize(String size) {
String[] xes = size.split("x");
this.width = Integer.parseInt(xes[0]);
this.height = Integer.parseInt(xes[1]);
}
@Override
public void execute(WebContext context) {
context.driver().manage().window().setSize(new Dimension(width, height));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy