模拟登陆百度 python

from time import sleep
from selenium import webdriver driver = webdriver.Firefox()
driver.get('http://www.baidu.com/') driver.find_element_by_id('lb').click(); driver.find_element_by_id('TANGRAM__PSP_10__unameLoginLink').click() driver.find_element_by_id('TANGRAM__PSP_10__userName').send_keys('用户名');
driver.find_element_by_id('TANGRAM__PSP_10__password').send_keys('密码'); driver.find_element_by_id('TANGRAM__PSP_10__submit').click()
sleep(5) driver.quit()
上一篇:二,编程语言类别,和python变量基础


下一篇:Java模拟实现百度文档在线浏览