擅长:python、mysql、java
<p>是,iframe需要切换到</p>
<pre><code>WebDriverWait(browser, 5).until(EC.frame_to_be_available_and_switch_to_it((By.CSS_SELECTOR, '.top')))
</code></pre>
<p>进口</p>
<pre><code>from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
</code></pre>