当前位置: 首页>>代码示例>>Java>>正文


Java Coordinates类代码示例

本文整理汇总了Java中org.openqa.selenium.interactions.internal.Coordinates的典型用法代码示例。如果您正苦于以下问题:Java Coordinates类的具体用法?Java Coordinates怎么用?Java Coordinates使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Coordinates类属于org.openqa.selenium.interactions.internal包,在下文中一共展示了Coordinates类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: call

import org.openqa.selenium.interactions.internal.Coordinates; //导入依赖的package包/类
@Override
public Void call() throws Exception {
  Mouse mouse = ((HasInputDevices) getDriver()).getMouse();

  Coordinates elementLocation = null;
  if (elementProvided) {
    WebElement element = getKnownElements().get(elementId);
    elementLocation = ((Locatable) element).getCoordinates();
  }

  if (offsetsProvided) {
    mouse.mouseMove(elementLocation, xOffset, yOffset);
  } else {
    mouse.mouseMove(elementLocation);
  }
  return null;
}
 
开发者ID:alexkogon,项目名称:grid-refactor-remote-server,代码行数:18,代码来源:MouseMoveToLocation.java

示例2: getCoordinates

import org.openqa.selenium.interactions.internal.Coordinates; //导入依赖的package包/类
@Override
public Coordinates getCoordinates()
{
    if ( webElement instanceof Locatable )
    {
        if ( cachedCoordinates == null )
            cachedCoordinates = ( (Locatable) webElement ).getCoordinates();
    
        return cachedCoordinates;
    }
    else
        return null;
}
 
开发者ID:xframium,项目名称:xframium-java,代码行数:14,代码来源:MorelandWebElement.java

示例3: getCoordinates

import org.openqa.selenium.interactions.internal.Coordinates; //导入依赖的package包/类
@Override
public Coordinates getCoordinates()
{
    try
    {
        return ((Locatable)delegate).getCoordinates();
    }
    catch (StaleElementReferenceException e)
    {
        reLocateElement();
        return getCoordinates();
    }
}
 
开发者ID:d0k1,项目名称:jsflight,代码行数:14,代码来源:LocatedElement.java

示例4: call

import org.openqa.selenium.interactions.internal.Coordinates; //导入依赖的package包/类
@Override
public Void call() throws Exception {
  TouchScreen touchScreen = ((HasTouchScreen) getDriver()).getTouch();
  WebElement element = getKnownElements().get(elementId);
  Coordinates elementLocation = ((Locatable) element).getCoordinates();

  touchScreen.singleTap(elementLocation);

  return null;
}
 
开发者ID:alexkogon,项目名称:grid-refactor-remote-server,代码行数:11,代码来源:SingleTapOnElement.java

示例5: call

import org.openqa.selenium.interactions.internal.Coordinates; //导入依赖的package包/类
@Override
public Void call() throws Exception {
  TouchScreen touchScreen = ((HasTouchScreen) getDriver()).getTouch();

  if (elementId != null) {
    WebElement element = getKnownElements().get(elementId);
    Coordinates elementLocation = ((Locatable) element).getCoordinates();
    touchScreen.flick(elementLocation, xOffset, yOffset, speed);
  } else {
    touchScreen.flick(xSpeed, ySpeed);
  }

  return null;
}
 
开发者ID:alexkogon,项目名称:grid-refactor-remote-server,代码行数:15,代码来源:Flick.java

示例6: call

import org.openqa.selenium.interactions.internal.Coordinates; //导入依赖的package包/类
@Override
public Void call() throws Exception {
  TouchScreen touchScreen = ((HasTouchScreen) getDriver()).getTouch();
  WebElement element = getKnownElements().get(elementId);
  Coordinates elementLocation = ((Locatable) element).getCoordinates();

  touchScreen.doubleTap(elementLocation);

  return null;
}
 
开发者ID:alexkogon,项目名称:grid-refactor-remote-server,代码行数:11,代码来源:DoubleTapOnElement.java

示例7: call

import org.openqa.selenium.interactions.internal.Coordinates; //导入依赖的package包/类
@Override
public Void call() throws Exception {
  TouchScreen touchScreen = ((HasTouchScreen) getDriver()).getTouch();
  WebElement element = getKnownElements().get(elementId);
  Coordinates elementLocation = ((Locatable) element).getCoordinates();
  touchScreen.longPress(elementLocation);

  return null;
}
 
开发者ID:alexkogon,项目名称:grid-refactor-remote-server,代码行数:10,代码来源:LongPressOnElement.java

示例8: call

import org.openqa.selenium.interactions.internal.Coordinates; //导入依赖的package包/类
@Override
public Void call() throws Exception {
  TouchScreen touchScreen = ((HasTouchScreen) getDriver()).getTouch();

  if (elementId != null) {
    WebElement element = getKnownElements().get(elementId);
    Coordinates elementLocation = ((Locatable) element).getCoordinates();
    touchScreen.scroll(elementLocation, xOffset, yOffset);
  } else {
    touchScreen.scroll(xOffset, yOffset);
  }
  return null;
}
 
开发者ID:alexkogon,项目名称:grid-refactor-remote-server,代码行数:14,代码来源:Scroll.java

示例9: mouseMove

import org.openqa.selenium.interactions.internal.Coordinates; //导入依赖的package包/类
/**
 *
 * @param where
 * @return
 */
public Element mouseMove(final Coordinates where) {
  this.logAction("MOUSE MOVE");
  new RetryUntilTimeout<Boolean>() {
    @Override
    Boolean commandsToRun() {
      getDriver().getMouse().mouseMove(where);
      return true;
    }
  }.run();
  return this;
}
 
开发者ID:BenjaminLimb,项目名称:web-test-framework,代码行数:17,代码来源:Element.java

示例10: getCoordinates

import org.openqa.selenium.interactions.internal.Coordinates; //导入依赖的package包/类
/**
 *
 * @return
 */
@Override
public Coordinates getCoordinates() {
  return new RetryUntilTimeout<Coordinates>() {
    @Override
    Coordinates commandsToRun() {
      return ((Locatable) element).getCoordinates();
    }
  }.run();
}
 
开发者ID:BenjaminLimb,项目名称:web-test-framework,代码行数:14,代码来源:Element.java

示例11: equals

import org.openqa.selenium.interactions.internal.Coordinates; //导入依赖的package包/类
@Override
public boolean equals(Object obj) {
    if (obj instanceof Coordinates) {
        Coordinates other = (Coordinates) obj;
        return Objects.equal(onScreen(), other.onScreen()) &&
                Objects.equal(onPage(), other.onPage()) &&
                Objects.equal(inViewPort(), other.inViewPort());
    }
    return false;
}
 
开发者ID:viltgroup,项目名称:minium,代码行数:11,代码来源:MockWebElement.java

示例12: getCoordinates

import org.openqa.selenium.interactions.internal.Coordinates; //导入依赖的package包/类
@Override
public Coordinates getCoordinates() {
    return ((Locatable) getWrappedWebElement()).getCoordinates();
}
 
开发者ID:WileyLabs,项目名称:teasy,代码行数:5,代码来源:BaseTeasyElement.java

示例13: getCoordinates

import org.openqa.selenium.interactions.internal.Coordinates; //导入依赖的package包/类
@Override
public Coordinates getCoordinates() {
    throw noSuchElementException();
}
 
开发者ID:WileyLabs,项目名称:teasy,代码行数:5,代码来源:NullTeasyElement.java

示例14: getCoordinates

import org.openqa.selenium.interactions.internal.Coordinates; //导入依赖的package包/类
@Override
public Coordinates getCoordinates() {
  return locatable.getCoordinates();
}
 
开发者ID:Cognifide,项目名称:bobcat,代码行数:5,代码来源:BobcatWebElement.java

示例15: elementLocation

import org.openqa.selenium.interactions.internal.Coordinates; //导入依赖的package包/类
public Coordinates elementLocation() {
    ElementLocationProbe location = new ElementLocationProbe(selector);
    check(location);
    return location.coordinates();
}
 
开发者ID:testinfected,项目名称:mario,代码行数:6,代码来源:WebElementDriver.java


注:本文中的org.openqa.selenium.interactions.internal.Coordinates类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。