.selenide-core.7.7.0.source-code.select-options-by-index.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of selenide-core Show documentation
Show all versions of selenide-core Show documentation
Selenide = concise API for Selenium WebDriver
The newest version!
(function(select, indexes) {
import 'selects.js'
function checkMissingOptionsIndexes() {
const missingOptionsIndexes = indexes.filter(index => !select.options[index]);
return missingOptionsIndexes.length > 0 ? {optionsNotFound: missingOptionsIndexes} : null
}
function checkDisabledOptionsIndexes() {
const disabledOptionsIndexes = indexes.filter(index => select.options[index].disabled);
return disabledOptionsIndexes.length > 0 ? {disabledOptions: disabledOptionsIndexes} : null
}
return checkState(select) || checkMissingOptionsIndexes() || checkDisabledOptionsIndexes() || applyChanges(select, () => {
for (let index of indexes) {
select.options[index].selected = 'selected'
}
})
})(arguments[0], arguments[1])
© 2015 - 2025 Weber Informatics LLC | Privacy Policy