Best practice to wait for a change with Selenium Webdriver?

前端 未结 5 2331
情话喂你
情话喂你 2021-02-13 02:08

After a click event I need to wait for an elements attribute to change before proceeding further (click event causes certain elements to move out of focus and certain others get

5条回答
  •  臣服心动
    2021-02-13 02:55

    It's a recurring problem of Selenium. I am not sure about a "best" implementation existing. I believe it's largely depending on the situation.

    Concerning AJAX-driven changes, I would generally use a waitForElementPresent or a waitForElementNotPresent depending on the changes the AJAX call will make on the page.

提交回复
热议问题