Title: Lab 7
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 you will execute in Selenium, then convert the test script to Python and finally execute an edited version of the Python script that accepts input from the user to modify a search parameter for a web based application.

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.  Open www.austincc.edu/ on the Firefox window (right hand side).  You are going to navigate through this website and Selenium will record all of the activity.

4.  Click on the RED record button on the Selenium window (left hand side) and proceed to browse and navigate with Firefox on the selected web site (right hand side).   The required navigation is to click on “Employee Directory” in the top center of the screen, then enter “William Tucker” and click on “Search”. Firefox will now display a page with office hours and contact information.

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 “yourlastnameLab7.html”

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

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

8.  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”)

9.  You now need to modify the Python generated code to prompt the user to enter the name of a faculty and execute the search for information using the inputted faculty name.

10.  Continue to modify the Python generated code so that that it will loop and request faculty names until the name QUIT is entered.

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