web验收测试的浏览器抽象
splinter的Python项目详细描述
splinter-用于测试web应用程序的python工具
splinter是一个开源工具,用于使用python测试web应用程序。 它允许您自动化浏览器操作,例如访问url和与它们的项目交互。
示例代码
from splinter import Browser browser = Browser() browser.visit('http://google.com') browser.fill('q', 'splinter - python acceptance testing for web applications') browser.find_by_name('btnG').click() if browser.is_text_present('splinter.readthedocs.io'): print "Yes, the official website was found!" else: print "No, it wasn't found... We need to improve our SEO techniques" browser.quit()
注意:如果不为^{t t 1}$函数提供任何驱动程序参数,则将使用firefox(Browser function documentation)。
拆分开源项目
外部链接
- Django Full Stack Testing and BDD with Lettuce and Splinter
- Splinter: Python tool for acceptance tests on web applications
- Testes de aceitação com Lettuce e Splinter (pt-br)
- salad,一个很好的bdd成分的混合体(splinter+lettuce集成)
- behave-django,在django中使用Behave进行bdd测试。与碎片很好地配合。
- pytest-splinter,用于py.test流道的碎片插件。
- PyPOM、pypom或python页面对象模型是一个python库,它提供了一个用于selenium或spliter功能测试的基本页面对象模型。
- pypom_form,是一个基于pypom的包,它为与splinter兼容的页面对象模型提供基于声明性模式的表单交互。