课程: Test Automation with Selenium WebDriver for Java
免费学习该课程!
今天就开通帐号,24,700 门业界名师课程任您挑!
Solution: Wait for appearance
(uptempo music) - [Instructor] On the dynamically modified page, I find the element that is going to be removed. Then I click the button that will remove that element from the DOM. The page says that the element will be removed in half a second, which is 5,000 milliseconds. So I construct an explicit weight that will weight 5,001 milliseconds, leaving a little room for the action to complete. I then use that weight to specify the condition to wait for, which is the invisibility of the element. This call returns a Boolean value, so I print that out just to make sure that it's true.