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


Java HasIdentity类代码示例

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


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

示例1: apply

import org.openqa.selenium.internal.HasIdentity; //导入依赖的package包/类
@Override
public WebElement apply(final WebElement element) {
    return (WebElement) newProxyInstance(
            getClass().getClassLoader(),
            new Class[]{WebElement.class, WrapsElement.class, Locatable.class, HasIdentity.class},
            invocationHandlerFor(element)
    );
}
 
开发者ID:WileyLabs,项目名称:teasy,代码行数:9,代码来源:FrameAwareWebElementTransformer.java

示例2: getId

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

示例3: replaceElementValueCommand

import org.openqa.selenium.internal.HasIdentity; //导入依赖的package包/类
/**
 * This method forms a {@link java.util.Map} of parameters for the element
 * value replacement. It is used against input elements
 *
 * @param hasIdentityObject an instance which contains an element ID
 * @param value a new value
 * @return a key-value pair. The key is the command name. The value is a
 * {@link java.util.Map} command arguments.
 */
public static Map.Entry<String, Map<String, ?>>  replaceElementValueCommand(
    HasIdentity hasIdentityObject, String value) {
    String[] parameters = new String[] {"id", "value"};
    Object[] values =
        new Object[] {hasIdentityObject.getId(), value};

    return new AbstractMap.SimpleEntry<String,
        Map<String, ?>>(REPLACE_VALUE, prepareArguments(parameters, values));
}
 
开发者ID:JoeUtt,项目名称:menggeqa,代码行数:19,代码来源:AndroidMobileCommandHelper.java

示例4: toString

import org.openqa.selenium.internal.HasIdentity; //导入依赖的package包/类
@Override
public String toString() {
    if (seleniumElement == null) {
        return String.format("%s\n|- StaticElement <SeleniumElement: null><Locator: %s>",
                getParent(), locator);
    }
    return String.format("%s\n|- StaticElement <SeleniumElementId: %s><Locator: %s>",
            getParent(), ((HasIdentity) seleniumElement).getId(), locator);
}
 
开发者ID:KarlGong,项目名称:easyium-java,代码行数:10,代码来源:StaticElement.java

示例5: toString

import org.openqa.selenium.internal.HasIdentity; //导入依赖的package包/类
@Override
public String toString() {
    if (seleniumElement == null) {
        return String.format("%s\n|- DynamicElement <SeleniumElement: null><Locator: %s><FoundBy: %s>",
                getParent(), locator, foundBy);
    }
    return String.format("%s\n|- DynamicElement <SeleniumElementId: %s><Locator: %s><FoundBy: %s>",
            getParent(), ((HasIdentity) seleniumElement).getId(), locator, foundBy);
}
 
开发者ID:KarlGong,项目名称:easyium-java,代码行数:10,代码来源:DynamicElement.java

示例6: ActionParameter

import org.openqa.selenium.internal.HasIdentity; //导入依赖的package包/类
public ActionParameter(String actionName, HasIdentity el) {
    this.actionName = actionName;
    optionsBuilder = ImmutableMap.builder();
    addParameter("element", el.getId());
}
 
开发者ID:JoeUtt,项目名称:menggeqa,代码行数:6,代码来源:TouchAction.java

示例7: press

import org.openqa.selenium.internal.HasIdentity; //导入依赖的package包/类
/**
 * Press on an element, offset from upper left corner by a number of pixels.
 *
 * @param el element to press on.
 * @param x  x offset.
 * @param y  y offset.
 * @return this TouchAction, for chaining.
 */
public TouchAction press(WebElement el, int x, int y) {
    ActionParameter action = new ActionParameter("press", (HasIdentity) el);
    action.addParameter("x", x);
    action.addParameter("y", y);
    parameterBuilder.add(action);
    return this;
}
 
开发者ID:JoeUtt,项目名称:menggeqa,代码行数:16,代码来源:TouchAction.java

示例8: moveTo

import org.openqa.selenium.internal.HasIdentity; //导入依赖的package包/类
/**
 * Move current touch to an element, offset from upper left corner.
 *
 * @param el element to move current touch to.
 * @param x  x offset.
 * @param y  y offset.
 * @return this TouchAction, for chaining.
 */
public TouchAction moveTo(WebElement el, int x, int y) {
    ActionParameter action = new ActionParameter("moveTo", (HasIdentity) el);
    action.addParameter("x", x);
    action.addParameter("y", y);
    parameterBuilder.add(action);
    return this;
}
 
开发者ID:JoeUtt,项目名称:menggeqa,代码行数:16,代码来源:TouchAction.java

示例9: tap

import org.openqa.selenium.internal.HasIdentity; //导入依赖的package包/类
/**
 * Tap an element, offset from upper left corner.
 *
 * @param el element to tap.
 * @param x  x offset.
 * @param y  y offset.
 * @return this TouchAction, for chaining.
 */
public TouchAction tap(WebElement el, int x, int y) {
    ActionParameter action = new ActionParameter("tap", (HasIdentity) el);
    action.addParameter("x", x);
    action.addParameter("y", y);
    parameterBuilder.add(action);
    return this;
}
 
开发者ID:JoeUtt,项目名称:menggeqa,代码行数:16,代码来源:TouchAction.java

示例10: longPress

import org.openqa.selenium.internal.HasIdentity; //导入依赖的package包/类
/**
 * Press and hold the at the center of an element until the contextmenu event has fired.
 *
 * @param el       element to long-press.
 * @param duration of the long-press, in milliseconds.
 * @return this TouchAction, for chaining.
 */
public TouchAction longPress(WebElement el, int duration) {
    ActionParameter action = new ActionParameter("longPress", (HasIdentity) el);
    action.addParameter("duration", duration);
    parameterBuilder.add(action);
    return this;
}
 
开发者ID:JoeUtt,项目名称:menggeqa,代码行数:14,代码来源:TouchAction.java


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