= Selenium = Web apps testing platform == Selenium IDE == Plguin for Firefox http://release.seleniumhq.org/selenium-ide/2.5.0/selenium-ide-2.5.0.xpi http://docs.seleniumhq.org/docs/01_introducing_selenium.jsp http://docs.seleniumhq.org/docs/02_selenium_ide.jsp Selenium IDE (Integrated Development Environment) is a prototyping tool for building test scripts. It is a Firefox plugin and provides an easy-to-use interface for developing automated tests. Selenium IDE has a recording feature, which records user actions as they are performed and then exports them as a reusable script in one of many programming languages that can be later executed. == Sample test suite for Yii blog demo == ts.html {{{#!highlight html Test Suite
Test Suite
Login and Logout
Add post
deletePost
}}} loginLogout.html {{{#!highlight html Login and Logout
Login and Logout
storeEval prompt("User"); userx
storeEval prompt("Password"); passwordx
open http://localhostyii/demos/blog/
clickAndWait link=Login
type id=LoginForm_username ${userx}
type id=LoginForm_password ${passwordx}
clickAndWait //input[@value='Login']
clickAndWait link=Logout (demo)
}}} addPost.html {{{#!highlight html Add post
Add post
open http://localhostyii/demos/blog/
clickAndWait link=Login
type id=LoginForm_username demo
type id=LoginForm_password demo
clickAndWait name=yt0
clickAndWait link=Create New Post
type id=Post_title Selenium Title
store javascript{ new Date().toString() } datex
type id=Post_content ${datex}
clickAndWait name=yt0
waitForText link=Selenium Title AABBCC Selenium Title AABBCC
click link=Logout (demo)
}}} deletePost.html {{{#!highlight html deletePost
deletePost
open http://localhostyii/demos/blog/
clickAndWait link=Login
type id=LoginForm_username demo
type id=LoginForm_password demo
clickAndWait name=yt0
clickAndWait link=Manage Posts
clickAndWait css=img[alt="Delete"]
assertConfirmation Are you sure you want to delete this item?
clickAndWait link=Logout
}}}