1 / 22

Selenium IDE

Selenium IDE. Installation and Use. Selenium Who?.

tyra
Télécharger la présentation

Selenium IDE

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Selenium IDE Installation and Use

  2. 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. “

  3. 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.

  4. You’ll then see the following window: • Click the Install Now button.

  5. You’ll then see the following window: • Click the Restart Now button. Firefox will restart.

  6. To verify that you have Selenium IDE installed, open the Selenium IDE window by one of two methods: • Keyboard: Control-Alt-s • In the Firefox menu, Choose options Web Developer …Selenium IDE

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

  8. Recording a script The record button The record button is on by default. Click it to turn recording off.

  9. How to record a Selenium Test Script • In Firefox, navigate to the OLE function you wish to test • Start the Selenium plug-in • Make sure the Selenium record button is On. • Begin using the OLE function. • Selenium will begin recording your commands…

  10. As you enter commands into the web browser, Selenium will record them… Recorded commands

  11. 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.

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

  13. 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.

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

  15. 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.

  16. 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.

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

  18. 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 to Locate your saved test script, And the Attach button to attach It to the OLETS issue.

  19. 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.

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

  21. 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

  22. Adding Comments (continued) • After you have recorded and saved your test script, examine the commands listed in the right-hand column of the Selenium window.

More Related