• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java HasIdentity类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java WeekView类代码示例发布时间:2022-05-22
下一篇:
Java FirebaseToken类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap