Files
serenity/Tests/LibWeb/Text/input/HTML/HTMLSelectElement-can-select-option-in-JS.html
Timur Sultanov ff18de7f46 Tests: Add test for selection option in <select>
Verify that we can select option using JS

(cherry picked from commit 1ce9bbdd6dcf0f1634014e57d700b697635a79d8)
2024-07-28 12:59:58 -04:00

17 lines
346 B
HTML

<!DOCTYPE html>
<script src="../include.js"></script>
<select id="select-test">
<option>A</option>
<option>B</option>
</select>
<script>
test(() => {
const s = document.getElementById("select-test");
s.options[1].selected = true;
if(s.value === "B") {
println("PASS");
}
});
</script>