本文整理汇总了Java中com.qmetry.qaf.automation.util.StringUtil.isXpath方法的典型用法代码示例。如果您正苦于以下问题:Java StringUtil.isXpath方法的具体用法?Java StringUtil.isXpath怎么用?Java StringUtil.isXpath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.qmetry.qaf.automation.util.StringUtil
的用法示例。
在下文中一共展示了StringUtil.isXpath方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: waitForCSSClassPresent
import com.qmetry.qaf.automation.util.StringUtil; //导入方法依赖的package包/类
public void waitForCSSClassPresent(String elementVisibleIndicator, final String cssClass) {
final String ele;
if (StringUtil.isXpath(elementVisibleIndicator)) {
ele = StringUtil.getWellFormedXPATH(elementVisibleIndicator);
} else {
ele = elementVisibleIndicator;
}
new Wait() {
@Override
public boolean until() {
return selenium.getAttribute(ele + "@class").contains(cssClass);
}
}.wait("CSS class not present", Long.parseLong(getDefaultPageWaitTime()));
}
示例2: waitForCSSClassNotPresent
import com.qmetry.qaf.automation.util.StringUtil; //导入方法依赖的package包/类
public void waitForCSSClassNotPresent(String elementVisibleIndicator, final String cssClass) {
final String ele;
if (StringUtil.isXpath(elementVisibleIndicator)) {
ele = StringUtil.getWellFormedXPATH(elementVisibleIndicator);
} else {
ele = elementVisibleIndicator;
}
new Wait() {
@Override
public boolean until() {
return !selenium.getAttribute(ele + "@class").contains(cssClass);
}
}.wait("CSS class present", Long.parseLong(getDefaultPageWaitTime()), getDefaultWaitIntervalTimeNum());
}
示例3: waitForElementAttribute
import com.qmetry.qaf.automation.util.StringUtil; //导入方法依赖的package包/类
public void waitForElementAttribute(String ele, String attr, String val, String timeout) {
if (StringUtil.isXpath(ele)) {
ele = StringUtil.getWellFormedXPATH(ele);
}
selenium.waitForCondition("var attr=selenium.getAttribute('" + ele + "@" + attr + "');attr==" + val + ";",
timeout);
}
示例4: getConditionforCSSClassNotExist
import com.qmetry.qaf.automation.util.StringUtil; //导入方法依赖的package包/类
public static String getConditionforCSSClassNotExist(String ele, String className) {
if (StringUtil.isXpath(ele)) {
ele = StringUtil.getWellFormedXPATH(ele);
}
return String.format("var attr=selenium.getAttribute(\"%[email protected]\");attr.indexOf('%s')<=0;", ele, className);
}
示例5: getConditionforCSSClassExist
import com.qmetry.qaf.automation.util.StringUtil; //导入方法依赖的package包/类
public static String getConditionforCSSClassExist(String ele, String className) {
if (StringUtil.isXpath(ele)) {
ele = StringUtil.getWellFormedXPATH(ele);
}
return String.format("var attr=selenium.getAttribute(\"%[email protected]\");attr.indexOf('%s')>=0;", ele, className);
}
示例6: waitForConditionForElementPresetn
import com.qmetry.qaf.automation.util.StringUtil; //导入方法依赖的package包/类
public static String waitForConditionForElementPresetn(String ele) {
if (StringUtil.isXpath(ele)) {
ele = StringUtil.getWellFormedXPATH(ele);
}
return String.format("selenium.isElementPresent(\"%s\")", ele);
}