import { WebElement } from "../"; export class Select { /** * Create an Select Element * @param {WebElement} element Select WebElement. */ constructor(element: WebElement); element: WebElement; /** * Select the option at the given index. This is done by examining the "index" attribute of an * element, and not merely by counting. * * @param {Number} index The option at this index will be selected * @return {Promise} */ selectByIndex(index: number): Promise; /** * * Select option by specific value. * * const selectBox = await driver.findElement(By.id("selectbox")); await selectObject.selectByValue("Value"); * * * * @param {string} value value of option element to be selected */ selectByValue(value: string): Promise; /** * * Select option with displayed text matching the argument. * * const selectBox = await driver.findElement(By.id("selectbox")); await selectObject.selectByVisibleText("Option 2"); * * * @param {String|Number} text text of option element to get selected * */ selectByVisibleText(text: string | number): Promise; /** * @return {!Promise>} All options belonging to this select tag */ getOptions(): Promise; /** * Retruns a boolean value if the select tag is multiple * @returns {Promise} */ isMultiple(): Promise; /** * Returns a list of all selected options belonging to this select tag * * @returns {Promise} */ getAllSelectedOptions(): Promise; /** * Returns first Selected Option * @returns {Promise} */ getFirstSelectedOption(): Promise; /** * Deselects all selected options * @returns {Promise} */ deselectAll(): Promise; /** * @param {string|Number}text text of option to deselect * @returns {Promise} */ deselectByVisibleText(text: string | number): Promise; /** * @param {Number} index index of option element to deselect * Deselect the option at the given index. * This is done by examining the "index" * attribute of an element, and not merely by counting. * @returns {Promise} */ deselectByIndex(index: number): Promise; /** * @param {String} value value of an option to deselect * @returns {Promise} */ deselectByValue(value: string): Promise; }