标签:content iframe css put pwd input efault def implicit
from selenium import webdriver
import time
driver = webdriver.Chrome()
driver.get("https://mail.163.com/")
driver.implicitly_wait(15)
# 切换iframe
iframe = driver.find_element_by_css_selector("#loginDiv>iframe")
driver.switch_to.frame(iframe)
driver.find_element_by_css_selector(".j-inputtext.dlemail.j-nameforslide").send_keys("zy513290883@qq.com")
driver.find_element_by_css_selector(".j-inputtext.dlpwd").send_keys("zy951201...")
# 释放iframe,重新回到主页面上
driver.switch_to.default_content()
标签:content iframe css put pwd input efault def implicit
原文地址:https://www.cnblogs.com/Tofuir-miss/p/13151532.html