擅长:python、mysql、java
<p>要在页面刷新后检查元素是否可见,请使用显式sleep()函数,并在4秒钟后使用<code>WebDriverWait</code>检查组件是否可见。你知道吗</p>
<pre><code>element = WebDriverWait(driver, 10).until(
EC.presence_of_element_located((By.ID, "myDynamicElement"));
</code></pre>
<p>访问<a href="http://selenium-python.readthedocs.io/waits.html#explicit-waits" rel="nofollow noreferrer">http://selenium-python.readthedocs.io/waits.html#explicit-waits</a>以获得更好的理解。你知道吗</p>