Best practice to wait for a change with Selenium Webdriver?

前端 未结 5 2346
情话喂你
情话喂你 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:54

    I feel that using the WebDriverWait is pretty useful. One change you can make in your code is use -

    webelement.isDisplayed(); 
    

    instead of getting the style attribute.

提交回复
热议问题