Selenium: How to wait for options in a select to be populated?
You can use "WaitForSelectOption" command where your value can be direct label like label=1-saving Account target will have the object id
I used waitForElementPresent
with a css target.
Example: To wait for
<select id="myselect"></select>
to be populated with
<option value="123">One-two-three</option>
use
- Command:
waitForElementPresent
- Target:
css=#myselect option[value=123]
- Value: (leave it empty)
I found handy something like:
wait.until(
ExpectedConditions
.presenceOfNestedElementsLocatedBy(By.id(<selectioNId>), By.tagName("option"))
)