我想知道如何在Windows XP / Vista / 7上安装SeleniumHQ(http://seleniumhq.org/download/)?
在Ubuntu / Debian系统上,您只需输入以下命令:
$ sudo apt-get install python-pip
$ sudo pip install selenium
$ sudo apt-get install python-pip xvfb xserver-xephyr
$ sudo pip install selenium
然后我可以这样做:
#!/usr/bin/env python
from selenium import selenium
# ...
但是Windows怎么样?
我终于做到了但完全没有。我刚刚安装了seleniumHQ:
1. Download the last pip version from here: http://pypi.python.org/pypi/pip#downloads
2. Uncompress it
3. Download the last easy installer for Windows: (download the .exe at the bottom of http://pypi.python.org/pypi/setuptools ). Install it.
4. Go to the uncompressed pip directory and: python setup.py install
5. Add your python c:\Python2x\Scripts to the path
6. Run cmd.exe and type: pip install -U selenium
我最后可以输入:
python
>> from selenium import selenium
>>
它有效,耶!但是安装它仍然有问题:
xvfb xserver-xephyr
在Ubuntu / Debian OS上我只需输入:
sudo apt-get install python-pip xvfb xserver-xephyr
它可以工作,但Windows怎么样?我在superuser.com(take a look)上问过,但没有人回答:(