Skip to content

Commit bca6656

Browse files
committed
[js] use property instead of atom to get index of option element
1 parent be1ce37 commit bca6656

File tree

1 file changed

+2
-2
lines changed
  • javascript/node/selenium-webdriver/lib

1 file changed

+2
-2
lines changed

javascript/node/selenium-webdriver/lib/select.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ class Select {
191191
}
192192

193193
for (let option of options) {
194-
if ((await option.getAttribute('index')) === index.toString()) {
194+
if ((await option.getProperty('index')) === index.toString()) {
195195
await this.setSelected(option)
196196
}
197197
}
@@ -415,7 +415,7 @@ class Select {
415415
}
416416

417417
for (let option of options) {
418-
if ((await option.getAttribute('index')) === index.toString()) {
418+
if ((await option.getProperty('index')) === index.toString()) {
419419
if (await option.isSelected()) {
420420
await option.click()
421421
}

0 commit comments

Comments
 (0)