public WebElementFacade selectByVisibleText(final String label) { waitUntilElementAvailable(); Select select = new Select(webElement); select.selectByVisibleText(label); notifyScreenChange(); return this; }
/** * Type a value into a field and then press Enter, making sure that the field is empty first. * * @param value */ public WebElementFacade typeAndEnter(final String value) { waitUntilElementAvailable(); clear(); webElement.sendKeys(value, Keys.ENTER); notifyScreenChange(); return this; }
/** Wait for an element to be visible and enabled, and then click on it. */ public WebElementFacade click() { enableHighlightingIfRequired(); waitUntilElementAvailable(); logClick(); webElement.click(); notifyScreenChange(); return this; }
public WebElementFacade selectByIndex(int indexValue) { enableHighlightingIfRequired(); waitUntilElementAvailable(); Select select = new Select(webElement); select.selectByIndex(indexValue); notifyScreenChange(); return this; }
/** * Type a value into a field, making sure that the field is empty first. * * @param value */ public WebElementFacade type(final String value) { enableHighlightingIfRequired(); waitUntilElementAvailable(); clear(); webElement.sendKeys(value); notifyScreenChange(); return this; }
/** * Type a value into a field and then press TAB, making sure that the field is empty first. This * currently is not supported by all browsers, notably Firefox. * * @param value */ public WebElementFacade typeAndTab(final String value) { enableHighlightingIfRequired(); waitUntilElementAvailable(); clear(); webElement.sendKeys(value); webElement.sendKeys(Keys.TAB); getClock().pauseFor(100); notifyScreenChange(); return this; }