demo
# coding=utf-8 from selenium import webdriver driver=webdriver.Firefox() driver.get(‘http://www.baidu.com‘) driver.find_element_by_id(‘kw‘).send_keys(‘Selenium2‘) driver.find_element_by_id(‘su‘).click() driver.quit()
时间: 2024-10-07 12:20:39
demo
# coding=utf-8 from selenium import webdriver driver=webdriver.Firefox() driver.get(‘http://www.baidu.com‘) driver.find_element_by_id(‘kw‘).send_keys(‘Selenium2‘) driver.find_element_by_id(‘su‘).click() driver.quit()