List of usage examples for org.openqa.selenium.support.ui ExpectedConditions elementSelectionStateToBe
public static ExpectedCondition<Boolean> elementSelectionStateToBe(final By locator, final boolean selected)
From source file:com.hotwire.selenium.desktop.us.search.AirSearchFragment.java
License:Open Source License
public AirSearchFragment multiCityRoute(String departure1, String arrival1, Date date1, String departure2, String arrival2, Date date2) { if (departure1 != null) { multiRadioButton.click();/*from w ww . j a v a 2s . c o m*/ new WebDriverWait(getWebDriver(), MENU_VISIBLE_WAIT) .until(ExpectedConditions.elementSelectionStateToBe(multiRadioButton, true)); sendKeys(fromLocationForRoute1, departure1); sendKeys(toLocationForRoute1, arrival1); sendKeys(startDateForRoute1Field, (new SimpleDateFormat("MM/dd/yy")).format(date1) + Keys.TAB); sendKeys(fromLocationForRoute2, departure2); sendKeys(toLocationForRoute2, arrival2); sendKeys(startDateForRoute2, (new SimpleDateFormat("MM/dd/yy")).format(date2) + Keys.TAB); } return new AirSearchFragment(getWebDriver()); }
From source file:io.ddavison.conductor.FrameworkTest.java
License:Open Source License
@Test public void testWaitingFor() throws Exception { By checkbox = By.cssSelector("#checkbox"); check(checkbox).waitForCondition(ExpectedConditions.elementSelectionStateToBe(checkbox, true)); }
From source file:org.eclipse.che.selenium.pageobject.FindText.java
License:Open Source License
/** wait the 'Whole word only' checkbox is selected */ public void waitWholeWordIsSelected() { String locator = Locators.WHOLE_WORD_CHECKLBOX_INP; new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions.elementSelectionStateToBe(By.id(locator), true)); }
From source file:org.eclipse.che.selenium.pageobject.FindText.java
License:Open Source License
/** wait the 'Whole word only' checkbox is not selected */ public void waitWholeWordIsNotSelected() { String locator = Locators.WHOLE_WORD_CHECKLBOX_INP; new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions.elementSelectionStateToBe(By.id(locator), false)); }
From source file:org.eclipse.che.selenium.pageobject.FindText.java
License:Open Source License
/** wait the 'Search root' checkbox is selected */ public void waitSearchRootIsSelected() { String locator = Locators.SEARCH_ROOT_CHECKBOX_INP; new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions.elementSelectionStateToBe(By.xpath(locator), true)); }
From source file:org.eclipse.che.selenium.pageobject.FindText.java
License:Open Source License
/** wait the 'Search root' checkbox is not selected */ public void waitSearchRootIsNotSelected() { String locator = Locators.SEARCH_ROOT_CHECKBOX_INP; new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions.elementSelectionStateToBe(By.xpath(locator), false)); }
From source file:org.eclipse.che.selenium.pageobject.FindText.java
License:Open Source License
/** wait the 'File mask' checkbox is selected */ public void waitFileMaskIsSelected() { String locator = Locators.FILE_MASK_CHECKBOX_INP; new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions.elementSelectionStateToBe(By.xpath(locator), true)); }
From source file:org.eclipse.che.selenium.pageobject.FindText.java
License:Open Source License
/** wait the 'File mask' checkbox is not selected */ public void waitFileMaskIsNotSelected() { String locator = Locators.FILE_MASK_CHECKBOX_INP; new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions.elementSelectionStateToBe(By.xpath(locator), false)); }
From source file:org.eclipse.che.selenium.pageobject.git.GitCommit.java
License:Open Source License
/** * Wait for item check-box in the 'Git changed files tree panel' to be unselected. * * @param itemName name of the item/*from w w w.j a v a 2 s . c om*/ */ public void waitItemCheckBoxToBeUnSelected(String itemName) { new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions.elementSelectionStateToBe( (By.xpath(String.format(Locators.TREE_ITEM_CHECK_BOX + "//input", itemName))), false)); }
From source file:org.jboss.arquillian.graphene.condition.element.WebElementConditionFactory.java
License:Open Source License
@Override public ExpectedCondition<Boolean> isSelected() { return ExpectedConditions.elementSelectionStateToBe(element, !getNegation()); }