.selenide-core.7.7.0.source-code.select-options-by-value.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, values) {
import 'selects.js'
function checkMissingOptionsValues() {
const missingOptionsValues = values.filter(value => !optionByValue(select, value))
return missingOptionsValues.length > 0 ? {optionsNotFound: missingOptionsValues} : null
}
function checkDisabledOptionsValues() {
const disabledOptionsValues = values.filter(value => optionByValue(select, value).disabled);
return disabledOptionsValues.length > 0 ? {disabledOptions: disabledOptionsValues} : null
}
return checkState(select) || checkMissingOptionsValues() || checkDisabledOptionsValues() || applyChanges(select, () => {
for (let requestedValue of values) {
optionByValue(select, requestedValue).selected = 'selected'
}
})
})(arguments[0], arguments[1])
© 2015 - 2025 Weber Informatics LLC | Privacy Policy