本文整理了Java中org.openqa.selenium.Point.equals()
方法的一些代码示例,展示了Point.equals()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Point.equals()
方法的具体详情如下:
包路径:org.openqa.selenium.Point
类名称:Point
方法名:equals
暂无
代码示例来源:origin: selenide/selenide
WebDriver adjustBrowserPosition(Config config, WebDriver driver) {
if (config.browserPosition() != null) {
log.info("Set browser position to " + config.browserPosition());
String[] coordinates = config.browserPosition().split("x");
int x = Integer.parseInt(coordinates[0]);
int y = Integer.parseInt(coordinates[1]);
Point target = new Point(x, y);
Point current = driver.manage().window().getPosition();
if (!current.equals(target)) {
driver.manage().window().setPosition(target);
}
}
return driver;
}
代码示例来源:origin: org.richfaces/richfaces-page-fragments
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final Locations other = (Locations) obj;
if (!this.topLeft.equals(other.topLeft)) {
return false;
}
if (!this.topRight.equals(other.topRight)) {
return false;
}
if (!this.bottomLeft.equals(other.bottomLeft)) {
return false;
}
if (!this.bottomRight.equals(other.bottomRight)) {
return false;
}
return true;
}
代码示例来源:origin: io.wcm.qa/io.wcm.qa.galenium.verification
@Override
protected boolean checkForEquality(Point value1, Point value2) {
GaleniumReportUtil.getLogger().trace("comparing locations: '" + value1 + "' <> '" + value2 + "'");
return value1.equals(value2);
}
代码示例来源:origin: io.selendroid/selendroid-client
public Point call() throws Exception {
currentLocation = element.getLocation();
if (currentLocation.equals(expectedLocation)) {
return expectedLocation;
}
return null;
}
代码示例来源:origin: com.cognifide.qa.bb/bb-core
/**
* Condition that checks if animation of provided WebElement finished.
*
* @param element WebElement to be checked
* @return ExpectedCondition representing the above check
*/
public ExpectedCondition<WebElement> hasAnimationFinished(final WebElement element) {
final Deque<Point> locations = new ArrayDeque<>();
return webDriver -> {
Point currentLocation = element.getLocation();
boolean animationStopped = false;
if (!locations.isEmpty()) {
animationStopped = locations.peekFirst().equals(currentLocation);
}
locations.addFirst(currentLocation);
return animationStopped ? element : null;
};
}
代码示例来源:origin: Cognifide/bobcat
/**
* Condition that checks if animation of provided WebElement finished.
*
* @param element WebElement to be checked
* @return ExpectedCondition representing the above check
*/
public ExpectedCondition<WebElement> hasAnimationFinished(final WebElement element) {
final Deque<Point> locations = new ArrayDeque<>();
return webDriver -> {
Point currentLocation = element.getLocation();
boolean animationStopped = false;
if (!locations.isEmpty()) {
animationStopped = locations.peekFirst().equals(currentLocation);
}
locations.addFirst(currentLocation);
return animationStopped ? element : null;
};
}
代码示例来源:origin: org.seleniumhq.selenium/selenium-api
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Rectangle rectangle = (Rectangle) o;
if (! getPoint().equals(rectangle.getPoint())) {
return false;
}
return getDimension().equals(rectangle.getDimension());
}
内容来源于网络,如有侵权,请联系作者删除!