本文整理匯總了Java中com.qmetry.qaf.automation.util.StringUtil.getWellFormedXPATH方法的典型用法代碼示例。如果您正苦於以下問題:Java StringUtil.getWellFormedXPATH方法的具體用法?Java StringUtil.getWellFormedXPATH怎麽用?Java StringUtil.getWellFormedXPATH使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.qmetry.qaf.automation.util.StringUtil
的用法示例。
在下文中一共展示了StringUtil.getWellFormedXPATH方法的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);
}