Selenium: How to wait for options in a select to be populated?

后端 未结 9 1821
温柔的废话
温柔的废话 2020-12-14 18:14

I am using Selenium for the first time and am overwhelmed by the options. I am using the IDE in Firefox.

When my page loads, it subsequently fetches values via an JS

9条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-14 18:49

    I used waitForElementPresent with a css target.

    Example: To wait for

    
    

    to be populated with

    
    

    use

    • Command: waitForElementPresent
    • Target: css=#myselect option[value=123]
    • Value: (leave it empty)

提交回复
热议问题