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.htmlphp

相关文章
相关标签/搜索