Title: Lab 8
Course: Special Topics in Computer Programming (TEMPLATE) > Section: Competency Modules

Check schedule for due date

Objective:

In this lab you will use Selenium IDE to create a test script that will check the web page content of a working web page, then export the script to Selenium, and finally convert the test script to Python and execute the Python program.  This technique is especially valuable for doing regression testing on a web page that has undergone maintenance, because the test script was created from the previous version and will detect unintended changes from the maintenance activity.

Steps for success:

1.  Open the Firefox browser and click on the Selenium IDE icon.  Resize your windows so that you have Firefox on the right hand side of your screen and Selenium IDE on the left hand side of your screen (similar to what was shown in the video).

2.  Review the “SAMPLE WEBSITE TESTING USING FUNCTIONS IN SELENIUM IDE.pdf” file included with this assignment.  Note that there are Commands in Selenium IDE that can be used to verify specific content of the web site under test.

3.  Click on the RED record button on the Selenium window (left hand side) and open a web site of your choosing with Firefox on the right hand side of your screen.

4. Your assignment for this lab is to test TEN different web page objects in the web site(s) that you select to use for this Lab.   If the objects that you are trying to test don’t work, switch to another object that may be implemented differently and you can use more than one web site to achieve your TEN different objects, if needed.

5.  When you have finished step 4, click the RED button on the Selenium window to STOP recording.   Then on the left hand side, click on “File” then “Save Test Case As” and name your file as “yourlastnameLab8.html”

6.  Now click on the “Play Current Test Case” (second green arrow on the top of the Selenium IDE window).  If it plays too fast, you can adjust the speed with the sliding button to the left of the green arrows.

7.  Once the Selenium test case is running successfully, you need to export the test case as a Python program.  (Click on “File”, “Export Test Case As”, “Python 2 / unittest / Web Driver”)

8.  Make the following modifications to the generated code:

CHANGE  except NoSuchElementException, e: return False

TO          except NoSuchElementException as e: return False

CHANGE  except NoAlertPresentException, e: return False

TO          except NoAlertPresentException as e: return False

9.  When you have finished this lab, please submit both your Selenium and Python scripting files and a test summary report.

Attached Files: | - SAMPLE WEBSITE TESTING USING FUNCTIONS IN SELENIUM IDE(1).pdf