【发布时间】:2020-12-31 16:02:39
【问题描述】:
当我单击按钮时,它会触发重新加载当前页面(假设所有显示的内容都相同)。 如何等待重新加载过程?
在下面的代码失败的情况下,
Click Element btn1 # btn1 triggers the current page to be reloaded
Wait Until Element Is Visible btn2 timeout=10s # This line succeeds because the page is yet reloaded and btn2(not refreshed, old one) is visble
Click Element btn2 # This line fails because the page is not yet stable
如何实现如下代码?
Click Element btn1
**Wait Until The Current Page Is Reloaded And Became Stable Again**
Click Element btn2
【问题讨论】:
-
尝试先等待 btn2 不可见。所以旧的应该先消失,然后等待它再次出现。