Selenium python
来源:互联网 发布:mac应用程序没图标 编辑:程序博客网 时间:2024/05/18 20:33
s
我的环境mac os10.7(python2.7.3)(chrome 26.0.1410.65)
基础:
https://code.google.com/p/selenium/wiki/GettingStarted
http://docs.seleniumhq.org/docs/appendix_installing_python_driver_client.jsp
Python bindings for Selenium
sudo pip install -U selenium
如果用AptanaStudio,可以将“/Library/Python/2.7/site-packages”放在PYTHONPATH里
打开https://code.google.com/p/chromedriver/downloads/list,选择下载相应的chromedriver
解压,然后copy到环境变量的某个目录下(env 或者 echo $PATH可以查看)
sudo cp /Users/andy/Documents/Selenium/chromedriver /usr/local/bin/
操!
在mac os上一直有问题!
不知道为什么。估计是和版本有关(python、chrome、chromedriver它们的版本)
在windows上我先下了一个chromedriver2_win32_0.7.zip 2.7 MB
也有问题,然后换成下面这个就好了。我windows的chrome的版本是 22.0.1229.79
chromedriver_win_26.0.1383.0.zip 1.2 MB
如果chromedriver在环境变量里,可以不用手动指定
#chromedriver = "C:\Python27\chromedriver.exe"
#os.environ["webdriver.chrome.driver"] = chromedriver
#driver = webdriver.Chrome(chromedriver)
这是一个封装。
pip install seleniumwrapper
https://pypi.python.org/pypi/seleniumwrapper/
s
- Selenium python
- python selenium
- python+selenium
- python + selenium
- Python Selenium
- python selenium
- Python selenium
- python+selenium
- selenium-python
- Python selenium
- Python+selenium
- Python+selenium
- python+selenium
- Python selenium
- python selenium
- Python+selenium
- python中使用selenium
- Python + Selenium环境搭建
- 几个开源GIS软件
- VI的配置
- 一个游戏程序员的学习资料
- hdu 2922 Relax! It’s just a game
- 作业
- Selenium python
- 黑马程序员_java内部类之学习笔记
- 分享:sp_get_object_definition查找所有数据库下面哪些对象定义语句中包括想要查找的字符串
- opencv 笔记09Imgproc_Smoothing
- putty登录本地linux虚拟机
- Spring AOP IOC 的 Annotation 实现方式
- GIS开源软件大全
- PHP程序员最容易忽略的几个精华之处
- 黑马程序员_String类的学习