[selenium]元素在 iframe 中,無法點擊
driver.switch_to.frame(driver.find_element(By.CSS_SELECTOR,'iframe')) #跳轉到iframe time.sleep(5) InputButton = driver.find_element(By.LINK_TEXT,'GO') #在iframe中定位到元素 driver.execute_script('arguments[0].click();',InputButton) #點擊元素 time.sleep(5)

浙公網安備 33010602011771號