This section walks through recording the first test case with Selenium IDE
• Make sure the Record button in the right end of the toolbar is switched on
• Open https://nightly.olat.unizh.ch/nightly/dmz/
• Enter 'administrator' and the corresponding password and click 'Login'
• This should result in something like this:
The first test case in Selenium IDE
• To rerun the test, click on one of the green Play buttons
A few things Gotchas here Currently, Selenium IDE sometimes has refresh problems and you don't see the recorded steps until you move the mouse into the command table
• Selenium sometimes has troubles catching keyboard input when Firefox does form-autocompletion.
• Sometimes Selenium records 'click' instead of 'clickAndWait' and rerunning fails because of this.
• Selenium-Recording is not always 100% automated - in fact there is quite a bit of manual effort involved and you can do it all manually in Selenium IDE as well. For example: you can easily type 'clickAndWait' in the command field and enter the target link in the target field yourself - instead of relying on the record mechanism
• You can set Breakpoints in Selenium IDE by right clicking on any line and selecting 'Toggle Breakpoint' [B]
• You can run single Selenium commands by double-clicking on a line
Given that you are on the right page, you can let Selenium visualize a UI-Element by clicking on the 'Find' button. It will let the element blink green for a while
Selenium Record and Playback
NOTE: Selenium IDE is used for recording the test case while Selenium RC executes the test. Since Selenium IDE supports only Mozilla Firefox browser, recording the test case cannot be performed in any other browser. For executing the tests Selenium RC supports most of the widely used browsers Internet Explorer, Firefox, Opera, Safari etc for the test case execution.
Check here for the complete list http://seleniumhq.org/about/platforms.html#browsers
Recoding with Selenium IDE
• Open Firefox Browser: View >Sidebar>select ‘Selenium’ ..Selenium IDE is displayed on the left side
• To record a test case (log into your Yahoo mail and logout), enter the url in the browser ‘http://www.mail.yahoo.com’, login using a username & password. Sign out
• All actions will be recorded in Selenium IDE screen. During recording, Selenium-IDE will automatically insert commands into your test case based on your actions. Typically, this will include:
-clicking a link - click or clickAndWait commands
-entering values - type command
-selecting options from a drop-down listbox - select command
-clicking checkboxes or radio buttons - click command

• The script has table view and source view. In the table view, select a command. Details of the command will be displayed.
• Click on source view- by default recoded in HTML format. The format can be changed in Options->Format.
Adding Verifications and Asserts in the Script
With Selenium-IDE recording, go to the browser displaying your test application and right click anywhere on the page. You will see a context menu showing verify and/or assert commands.
• Now, right-click the selected text. The context menu should give you a verifyTextPresent command and the suggested parameter should be the text itself.
• Try right-clicking an image, or a user control like a button or a checkbox. You may need to use ‘Show All Available Commands’ to see options other than verifyTextPresent. Once you select these other options, the more commonly used ones will show up on the primary context menu. For example, selecting verifyElementPresent for an image should later cause that command to be available on the primary context menu the next time you select an image and right-click.
Saving the test case
• In Selenium IDE click ‘Run’ button to execute the test in the browser to verify if the script is working as expected for re iteration
• Now File->Export As Java(TestNG) test case. (The other formats available are PHP, Python,C#,Ruby,Perl,Groovy).
• Savethe file as ‘yahoomail.java’ in the folder F:/selenium/projects/Yahoo/com/testscripts