22
Selenium IDE Installation and Use

Selenium IDE

  • Upload
    tyra

  • View
    26

  • Download
    0

Embed Size (px)

DESCRIPTION

Selenium IDE. Installation and Use. Selenium Who?. - PowerPoint PPT Presentation

Citation preview

Page 1: Selenium IDE

Selenium IDEInstallation and Use

Page 2: Selenium IDE

Selenium Who?

“Selenium IDE is an integrated development environment for Selenium scripts. It is implemented as a Firefox extension, and allows you to record, edit, and debug tests. Selenium IDE includes the entire Selenium Core, allowing you to easily and quickly record and play back tests in the actual environment that they will run. “

Page 3: Selenium IDE

Installing the Selenium IDE plug-in• Open Firefox.• Navigate to http://seleniumhq.org/download/.• Download the latest version of Selenium IDE (currently version 1.9).• Firefox should show you the following warning:

• Click the Allow button.

Page 4: Selenium IDE

• You’ll then see the following window:

• Click the Install Now button.

Page 5: Selenium IDE

• You’ll then see the following window:

• Click the Restart Now button. Firefox will restart.

Page 6: Selenium IDE

• To verify that you have Selenium IDE installed, open the Selenium IDE window by one of two methods:

1. Keyboard: Control-Alt-s2. In the Firefox menu,Choose options Web Developer…Selenium IDE

Page 7: Selenium IDE

If Selenium is installed correctly, the Selenium plug-in window should pop-up.

the Selenium plug-in

Page 8: Selenium IDE

Recording a script

The record button

The record button is on by default. Click it to turn recording off.

Page 9: Selenium IDE

How to record a Selenium Test Script

1. In Firefox, navigate to the OLE function you wish to test2. Start the Selenium plug-in3. Make sure the Selenium record button is On.4. Begin using the OLE function.5. Selenium will begin recording your commands…

Page 10: Selenium IDE

• As you enter commands into the web browser, Selenium will record them…

Recorded commands

Page 11: Selenium IDE

While recording your script, you can right click on screen elements to reveal more Selenium commands.

For example, clicking on item ‘verifyTextPresent Borrower Type Name’ will add a line to your script that verifies that that text is present on the page.

Page 12: Selenium IDE

Saving your script

• When you are finished testing your OLE function, click the red record button to stop recording.

The record button

Page 13: Selenium IDE

• Save your script to a known file location (I suggest your desktop) by • using the keyboard combination of control-s• entering the File menu and selecting option Save Test Case.

Page 14: Selenium IDE

Please use a filename of the form OLETS <issue number> -<name of issue.> For example: “OLETS118-OLE Borrower Type maintenance document.html”

Page 15: Selenium IDE

Playing your script• After recording your test script, you can play it back to check if

it properly repeats your test scheme.• Don’t be surprised if your script fails! Success or failure is not

that important at this point.• The toolbar contains buttons for controlling the execution of

your test cases, including a step feature for debugging your test cases.

Page 16: Selenium IDE

Speed Control: controls how fast your test case runs. Run All: Runs the entire test suite when a test suite with multiple test cases is loaded.

Run: Runs the currently selected test. When only a single test is loaded this button and the Run All button have the same effect.

Pause/Resume: Allows stopping and re-starting of a running test case.

Step: Allows you to “step” through a test case by running it one command at a time. Use for debugging test cases.

Page 17: Selenium IDE

As the plug-in steps through your script, success and error messages will appear in the Log window.

The Log Window

Page 18: Selenium IDE

Attaching your Test Script to an OLETS issue• On your OLETS issue page, locate the attachments control

• Click the cross, and the Attach Files dialog will appear.

Use the Browse button toLocate your saved test script,And the Attach button to attach It to the OLETS issue.

Page 19: Selenium IDE

When you run Selenium, you may notice:

• Selenium suppresses pop-up error messages during recording and play-back.

• Selenium may open a new window instead of a new tab during recording and play-back.

• While Selenium is open, scroll-bars may disappear from some interfaces.

Page 20: Selenium IDE

• Once attached, your test script will appear in the Attachments area on the OLETS issue page.

Page 21: Selenium IDE

Adding Comments to your Test Scripts

• Everyone loves comments!• Adding comments makes your scripts more understandable to

those who have to use or edit them later.• Use comments to

Page 22: Selenium IDE

Adding Comments (continued)

1. After you have recorded and saved your test script, examine the commands listed in the right-hand column of the Selenium window.