Chinaunix首页 | 论坛 | 博客
  • 博客访问: 166457
  • 博文数量: 73
  • 博客积分: 3106
  • 博客等级: 中校
  • 技术积分: 730
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-11 22:57
文章分类

全部博文(73)

文章存档

2018年(2)

2016年(1)

2012年(8)

2011年(21)

2010年(41)

我的朋友

分类: 嵌入式

2011-03-16 09:16:35

Selenium 是 thoughtworks公司的一个集成测试的强大工具。学习文档在
  • Selenium IDE:(参考:)
  1. Selenium IDE的安装很简单,如果使用Firefox 2.0,可以直接将官网上下载的文件(例如selenium-ide-1.0-beta-2.xpi)置于Firefox安装路径下的extensions文件夹(默认安装路径C:\Program Files\Mozilla Firefox\extensions,而Firefox1.5的默认路径在C:\Program Files\Firefox Plus\App\firefox\extensions)下,然后关闭当前打开的Firefox窗口,重新打开即可执行自动安装。
  2. Selenium IDE 常用命令:

    Selenium commands come in three“flavors”: 

      Actions:commands that generally manipulate the state of the application

      Accessors:examine the state of the application and store the results in variables,They are also used to automatically generate Assertions.

      Assertions: verify that the state of the application conforms to what is expected.All Selenium Assertions can be used in 3 modes: “assert”, “verify”, and ” waitFor”.

      举例:

      open:opens a page using a URL.      click/clickAndWait:performs a click operation, and optionally waits for a new page to load.      verifyTitle/assertTitle:verifies an expected page title.      verifyTextPresent:verifies expected text is somewhere on the page.      verifyElementPresent:verifies an expected UI element, as defined by its HTML tag, is present on the page.      verifyText:verifies expected text and it’s corresponding HTML tag are present on the page.      verifyTable:verifies a table’s expected contents.      waitForPageToLoad:pauses execution until an expected new page loads. Called automatically when clickAndWait is used.      waitForElementPresent:pauses execution until an expected UI element, as defined by its HTML tag, is present on the page.    3.模式匹配:There are three types of patterns: globbing, regular expressions, and exact.
   

     






下载地址:
  下载Selenium Server (formerly the Selenium RC Server)
阅读(790) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~