Replies: 2 comments 7 replies
-
@joshden we have changed the |
Beta Was this translation helpful? Give feedback.
-
I see another case where I was waiting for await browser.execute(() => {
const select = document.createElement('select')
select.style.display = 'none'
select.innerHTML = `
<option value="1">Opt 1</option>
<option value="2" selected>2 option</option>`
document.body.appendChild(select)
setTimeout(() => select.style.display = '', 2000)
})
const $option = $('select > option:checked')
await $option.waitForDisplayed()
console.log({ text: await $option.getText() }) But the In WDIO 9, here is what I am using: const $select = $('select')
const $option = $select.$('option:checked')
await $option.waitForExist()
await $select.waitForDisplayed()
console.log({ text: await $option.getText() }) Is there something simpler for this? Thanks. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
We are in the process of converting a large code base from WDIO 7 to WDIO 9. In cases where a
<select>
element is displayed, in WDIO 7.16.4, the child<option>
elements were also reported as displayed. However, this behavior appears to have changed sometime between this and 9.9.1. In 9, it is reporting isDisplayed of false. This is the case both before and after clicking the<select>
element.Here's a simple test demonstrating this:
WDIO 7 yields this output:
But we see this output in WDIO 9:
Is this an expected change in behavior? I didn't find much regarding this with a quick google search. If this is expected, perhaps it should be documented as a breaking change (if it isn't already)? Thank you.
Beta Was this translation helpful? Give feedback.
All reactions