所以,我正在開發(fā)一個(gè) Selenium webdriver 項(xiàng)目,在其中一個(gè)過程中,我需要輸入 iframe,然后將密鑰發(fā)送到那里的輸入,但是,現(xiàn)在我想關(guān)閉或退出該 iframe要單擊該框架之外的按鈕,請查看我的代碼片段:WebDriverWait(bot,20).until(EC.frame_to_be_available_and_switch_to_it((By.CSS_SELECTOR,"iframe.top[title='Registration form']")))
WebDriverWait(bot, 20).until(EC.element_to_be_clickable((By.XPATH,'//*[@id="username"]'))).send_keys(self.usernameChar)
WebDriverWait(bot, 20).until(EC.element_to_be_clickable((By.XPATH,'//*[@id="username"]'))).send_keys(Keys.RETURN)你們能幫我嗎?注:我的google版本是85
如何在selenium中關(guān)閉iframe
繁華開滿天機(jī)
2023-08-08 17:24:05