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

后端 未结 9 1804
温柔的废话
温柔的废话 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:36

    Using java 8 Awaitility

    Awaitility.await()
    .atMost(5, TimeUnit.SECONDS)
    .until(() -> select.getOptions().size() > 0);
    

提交回复
热议问题