Skip to content

Commit 90502a0

Browse files
committed
[js] index needs to be a number not a string for this to pass
1 parent e2bece2 commit 90502a0

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

javascript/node/selenium-webdriver/test/select_test.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,10 @@ suite(
7878
let selector = new Select(
7979
driver.findElement(By.name(singleSelectValues1['name']))
8080
)
81-
for (let x in singleSelectValues1['values']) {
82-
await selector.selectByIndex(x)
81+
for (let [index, value] of singleSelectValues1['values'].entries()) {
82+
await selector.selectByIndex(index)
8383
let ele = await selector.getFirstSelectedOption()
84-
assert.deepEqual(
85-
await ele.getText(),
86-
singleSelectValues1['values'][x]
87-
)
84+
assert.deepEqual(await ele.getText(), value)
8885
}
8986
})
9087

0 commit comments

Comments
 (0)