分类: selenium

2 篇文章

selenium 安装与 chromedriver安装
安装selenium selenium可以直接可以用pip安装。 pip install selenium 安装chromedriver 当然,你首先需要查看你的Chrome版本,在浏览器中输入chrome://version/ 下载 如果需要看到最新版的chromedriver和chrome版本对应问题,点击http://npm.taobao.o…
selenium 常用方法
驱动的常用方法 driver方法作用.name检查驱动是基于什么浏览器(假设为.Firefox(),返回值则为firefox).get(网址)已get方法打开指定网址.title返回当前页面标题.current_url当前url.page_source获取当前页面的源(重要方法).back()在浏览器的历史记录中后腿一步。.forward()在浏览…