com.saucelabs.visual.model.IgnoreRegion Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-client Show documentation
Show all versions of java-client Show documentation
Java library to interact with Sauce Visual
package com.saucelabs.visual.model;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
public class IgnoreRegion {
private String name;
private int height;
private int width;
private int x;
private int y;
public IgnoreRegion(String name, int x, int y, int width, int height) {
this.name = name;
this.height = height;
this.width = width;
this.x = x;
this.y = y;
}
public IgnoreRegion(int x, int y, int width, int height) {
this.name = "";
this.height = height;
this.width = width;
this.x = x;
this.y = y;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getHeight() {
return height;
}
public void setHeight(int height) {
this.height = height;
}
public int getWidth() {
return width;
}
public void setWidth(int width) {
this.width = width;
}
public int getX() {
return x;
}
public void setX(int x) {
this.x = x;
}
public int getY() {
return y;
}
public void setY(int y) {
this.y = y;
}
public static List forElement(WebDriver driver, List elements) {
JavascriptExecutor js = (JavascriptExecutor) driver;
List