selenium webdriver w/python learning

===========
install
===========
1.安装python2.7:
下载地址:http://python.org/getit/
下载后直接点击就可以安装
2.安装setuptools
下载地址:http://pypi.python.org/pypi/setuptools#downloads (下载后直接点击就可以安装)
3.安装pip
下载地址:http://pypi.python.org/pypi/pip/1.0.2#downloads
command: python setup.py install (pip.exe 存在于 \scripts\)
4.安装selenium:
command: pip install selenium (如果是更新selenium,则用:pip install selenium --upgrade)


========================
python unittest framework
========================
1.可在"Python Manual"中查找关键词字“unittest”获取 framework的相关知识:也可参考中文网址(http://www.oschina.net/question/12_27127#RUNNING_CMD)
1).TestCase:
setUp()、tearDown()、test_*()
实例~~
2).TestSuite
addTest(testcase)
3).run test suite
a. if __name__ = "__main__": unittest.main()
b. unittest.TextTestRunner().run(suite)

================
selenium project
================
1. setup a webdriver project with python :
http://seleniumhq.org/docs/03_webdriver.html#setting-up-a-selenium-webdriver-project
http://readthedocs.org/docs/selenium-python/en/latest/navigating.html
2. selenium API: http://selenium.googlecode.com/svn/trunk/docs/api/py/api.html
3. Q&A: http://stackoverflow.com/questions/8832858/selenium-webdriver-click-is-not-working-sometimes-in-python
4. 代码解读http://svn.openqa.org/fisheye/browse/selenium/selenium-website/src/main/rst/cn/05_selenium_rc.rst?r1=2630&r2=2632&u=384&ignore=&k=

5.CSS定位http://saucelabs.com/blog/index.php/2009/10/selenium-tip-of-the-week-start-improving-your-locators/
                   http://www.w3.org/TR/2001/CR-css3-selectors-20011113/#attribute-selectors
                   http://kb.cnblogs.com/page/53784/
6. WebDriver API: http://readthedocs.org/docs/selenium-python/en/latest/api.html

转载于:https://my.oschina.net/hcp/blog/40847

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值