2016-12-06 57 views
0

相當於在Java中可以使用ExpectedConditions.not等到元素不再可見或不再可以發現是什麼ExpectedConditions.not的在Python

wait.until(ExpectedConditions.not(ExpectedConditions.elementToBeClickable(By.id("id1")))); 

什麼是Python的方式做到這一點?

回答

1

如果你想等到元素(不多)點擊,嘗試

wait.until_not(ExpectedConditions.element_to_be_clickable((By.ID,"id1"))); 

附:您應該記住,在加載頁面後,該元素最初可能無法點擊