Splinter - Python的Web应用程序验收测试工具

admin 13年前
     Splinter是一个基于Python开发的Web应用程序验收测试工具。Splinter是一个非常好用的工具,可以用于测试采用任意编程语言开发的Web应用程序。它可以执行和评估Javascript。它能够与表单中的文本输入框、File、Radio和按纽相交互。    <br /> 示例代码:    <br />    <pre class="brush:python; toolbar: true; auto-links: false;"> from splinter.browser import Browser   browser = Browser()   # Visit URL   url = "http://search.推ter.com"   browser.visit(url)   browser.fill('q', "#cobrateam")   # Find and click the 'search' button   button = browser.find_by_css("#searchButton input").first   # Interact with elements   button.click()   if browser.is_text_present("No results for #cobrateam"):       print "nobody likes us =("   else:       print "we're popular =)"                  </pre>项目地址:    <a href="/misc/goto?guid=4958185842392897647">http://splinter.cobrateam.info/</a>    <br />    <img title="Splinter - Python的Web应用程序验收测试工具" border="0" alt="Splinter - Python的Web应用程序验收测试工具" src="https://simg.open-open.com/show/59d7b6af36318fe525d13dab2a8c8f03.jpg" width="100" height="100" />