Python+Selenium与Chrome如何进行完美结合

Posted 划边逅

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Python+Selenium与Chrome如何进行完美结合相关的知识,希望对你有一定的参考价值。

from selenium import webdriver

import os

driver = webdriver.Chrome()
driver.get("http://cn.bing.com")
driver.find_element_by_xpath("//input[@id=‘sb_form_q‘]").send_keys("李晓鹏")
driver.find_element_by_xpath("//input[@id=‘sb_form_go‘]").click()
# driver.quit()

 

以上是关于Python+Selenium与Chrome如何进行完美结合的主要内容,如果未能解决你的问题,请参考以下文章