💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
[TOC] > [教程](http://www.testclass.net/selenium_python/install-selenium) ## 安装 selenium ``` pip3 install selenium ``` ## 各个浏览器驱动 Firefox浏览器驱动:[geckodriver](https://github.com/mozilla/geckodriver/releases) Chrome浏览器驱动:[chromedriver](https://sites.google.com/a/chromium.org/chromedriver/home),[taobao备用地址](https://npm.taobao.org/mirrors/chromedriver) IE浏览器驱动:[IEDriverServer](http://selenium-release.storage.googleapis.com/index.html) Edge浏览器驱动:[MicrosoftWebDriver](https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver) Opera浏览器驱动:[operadriver](https://github.com/operasoftware/operachromiumdriver/releases) PhantomJS浏览器驱动:[phantomjs](http://phantomjs.org/) ### 安装 chromedriver ``` choco install chromedriver ``` 如 choco 安装失败,则手动添加到 path ## hello word ``` from selenium import webdriver if __name__ == '__main__': driver = webdriver.Chrome() driver.get('https://www.baidu.com') print(driver.title) driver.quit() ```