本文整理了Java中org.openqa.selenium.support.ui.Select.deselectAll()
方法的一些代码示例,展示了Select.deselectAll()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Select.deselectAll()
方法的具体详情如下:
包路径:org.openqa.selenium.support.ui.Select
类名称:Select
方法名:deselectAll
[英]Clear all selected entries. This is only valid when the SELECT supports multiple selections.
[中]清除所有选定的条目。这仅在“选择”支持多个选择时有效。
代码示例来源:origin: stackoverflow.com
Select select = new Select(driver.findElement(By.xpath("//path_to_drop_down")));
select.deselectAll();
select.selectByVisibleText("Value1");
代码示例来源:origin: vmi/selenese-runner-java
/**
* Unset options if "select" is multiple.
*/
public void unsetOptions() {
selectUI.deselectAll();
}
代码示例来源:origin: elisarver/selophane
/**
* Wraps Selenium's method.
*
* @see org.openqa.selenium.support.ui.Select#deselectAll()
*/
public void deselectAll() {
innerSelect.deselectAll();
}
代码示例来源:origin: org.seleniumhq.selenium.fluent/fluent-selenium
public Boolean execute() {
getSelect().deselectAll();
return true;
}
}
代码示例来源:origin: wiselenium/wiselenium
@Override
public MultiSelect deselectAll() {
this.getWrappedSelect().deselectAll();
return this;
}
代码示例来源:origin: ru.sbtqa.htmlelements/htmlelements-java
/**
* Clear all selected entries. This is only valid when the SELECT supports multiple selections.
*
* @throws UnsupportedOperationException If the SELECT does not support multiple selections
*/
public void deselectAll() {
getSelect().deselectAll();
}
代码示例来源:origin: com.github.wiselenium/wiselenium-core
@Override
public MultiSelect deselectAll() {
this.getWrappedSelect().deselectAll();
return this;
}
代码示例来源:origin: yandex-qatools/htmlelements
/**
* Clear all selected entries. This is only valid when the SELECT supports multiple selections.
*
* @throws UnsupportedOperationException If the SELECT does not support multiple selections
*/
public void deselectAll() {
getSelect().deselectAll();
}
代码示例来源:origin: ru.yandex.qatools.htmlelements/htmlelements-java
/**
* Clear all selected entries. This is only valid when the SELECT supports multiple selections.
*
* @throws UnsupportedOperationException If the SELECT does not support multiple selections
*/
public void deselectAll() {
getSelect().deselectAll();
}
代码示例来源:origin: com.github.wiselenium/wiselenium-elements
@Override
public MultiSelect deselectAll() {
this.getWrappedSelect().deselectAll();
return this;
}
代码示例来源:origin: sayems/java.webdriver
public MultiSelect selectByText(Supplier<By> by, String... texts) {
Select select = new Select(findElement(by));
select.deselectAll();
Arrays.stream(texts).forEach(select::selectByVisibleText);
return this;
}
代码示例来源:origin: sayems/java.webdriver
public MultiSelect selectByValue(Supplier<By> by, String... values) {
Select select = new Select(findElement(by));
select.deselectAll();
Arrays.stream(values).forEach(select::selectByValue);
return this;
}
代码示例来源:origin: sayems/java.webdriver
public MultiSelect selectByIndex(Supplier<By> by, Integer... indices) {
Select select = new Select(findElement(by));
select.deselectAll();
Arrays.stream(indices).forEach(select::selectByIndex);
return this;
}
代码示例来源:origin: stackoverflow.com
WebElement dropdown = driver.findElement(By.id("month"));
Select select = new Select(dropdown);
select.deselectByVisibleText("Aug");
// or
select.deselectByValue("7");
// or
select.deselectByIndex(8);
// or
select.deselectAll();
代码示例来源:origin: com.saucelabs/sebuilder-interpreter
@Override
public boolean run(TestRun ctx) {
new Select(ctx.locator("locator").find(ctx)).deselectAll();
return true;
}
}
代码示例来源:origin: com.epam.jdi/jdi-light
/**
* Checks particular elements by index
* @param values int var arg, ids to check
*/
@JDIAction("Check '{0}' for '{name}'")
public void check(int... values) {
select().deselectAll();
for (int index : values)
select(index);
}
代码示例来源:origin: com.epam.jdi/jdi-light
/**
* Selects only particular elements
* @param values String var arg, elements with text to select
*/
@JDIAction("Check '{0}' for '{name}'")
public void check(String... values) {
select().deselectAll();
for (String value : values)
select().selectByVisibleText(value);
}
代码示例来源:origin: org.finra.jtaf/jtaf-extwebdriver
@Override
public void deselectAllOptions() throws WidgetException {
try {
org.openqa.selenium.support.ui.Select selectBox = new org.openqa.selenium.support.ui.Select(
findElement());
selectBox.deselectAll();
} catch (Exception e) {
throw new WidgetException("Error while deselecting all selected options", getByLocator(),
e);
}
}
代码示例来源:origin: selenium-cucumber/selenium-cucumber-java
/** Method to unselect all option from dropdwon list
@param accessType : String : Locator type (id, name, class, xpath, css)
@param accessName : String : Locator value
*/
public void unselectAllOptionFromMultiselectDropdown(String accessType, String accessName)
{
dropdown = wait.until(ExpectedConditions.presenceOfElementLocated(getelementbytype(accessType, accessName)));
selectList = new Select(dropdown);
selectList.deselectAll();
}
代码示例来源:origin: net.serenity-bdd/serenity-core
public WebElementFacade all() {
if (webElementFacade.driverIsDisabled()) { return webElementFacade; }
webElementFacade.waitUntilElementAvailable();
Select select = new Select(webElementFacade.getElement());
select.deselectAll();
webElementFacade.notifyScreenChange();
return webElementFacade;
}
内容来源于网络,如有侵权,请联系作者删除!