1 from selenium import webdriver 2 3 driver = webdriver.Chrome() 4 5 driver.get('https://mail.qq.com/cgi-bin/loginpage') 6 #进入下一层才能执行下列操作 7 driver.switch_to.frame("login_frame")
8 driver.find_element_by_class_name('inputstyle').send_keys('账号') 9 driver.find_element_by_name("p").send_keys('密码') 10 driver.find_element_by_class_name('btn').click()