更新时间:2022-12-14 15:09:57
隐式等待的默认值确实为零,这意味着(并且一直意味着)如果找不到该元素,则会立即使findElement
失败. "您不应该直接从findElement
收到TimeoutException
.使用WebDriverWait
构造,在使用所谓的显式等待"时,您可能只会收到该信息.
The default value for implicit waits is indeed zero, which means (and always has meant) "fail findElement
immediately if the element can't be found." You shouldn't be receiving a TimeoutException
directly from findElement
. You'll likely only be receiving that when using a so-called "explicit wait", using the WebDriverWait
construct.