Vous êtes sur la page 1sur 8

Simple Selenium IDE Test Suites Exercises Sheet

Selenium Your First Selenium Test Suites

Kangeyan Passoubady Kavin School

2010 Kavin School - http://www.kavinschool.com

9/4/2010

Page 1

Simple Selenium IDE Test Suites Exercises Sheet

Contents
1. Yahoo! Energy Efficient Test Case .................................................................................. 3 Things to do before doing this exercise: ............................................................................ 3 Actual Test Case Steps: ...................................................................................................... 3 After finishing your recording: .......................................................................................... 3 2. Google Energy Efficient Test Case ................................................................................. 4 Actual Test Case Steps: ...................................................................................................... 4 After finishing your recording: .......................................................................................... 4 3. GE Energy Efficient Test Case ........................................................................................ 5 Actual Test Case Steps: ...................................................................................................... 5 After finishing your recording: .......................................................................................... 5 4. Creating Energy Efficient Test Suite ............................................................................... 6 Actual Test Case Steps: ...................................................................................................... 6 After creating your test suite:............................................................................................. 6 5. GE Feedback & Inquiries Test Case ............................................................................... 7 Actual Test Case Steps: ...................................................................................................... 7 After finishing your recording: .......................................................................................... 7 6. Creating GE Test Suite ................................................................................................... 8 Actual Test Case Steps: ...................................................................................................... 8 After creating your test suite:............................................................................................. 8

2010 Kavin School - http://www.kavinschool.com


Page 2

Simple Selenium IDE Test Suites Exercises Sheet

1. Yahoo! Energy Efficient Test Case


Things to do before doing this exercise:
1. 2. 3. 4. 5. Go to Firefox Tools Selenium IDE (Open your Selenium IDE) Go to Selenium IDE Options Options General Tab Uncheck Remember base URL Option Uncheck Record AssertTitle Automatically Keep the Selenium IDE minimized in recording mode

Actual Test Case Steps:


1. Open Firefox Web Browser 2. In the address bar, Type http://www.yahoo.com 3. AssertTitle Yahoo! ( - This will make sure you are in the home page of Yahoo To do this step anywhere in the white space right click Show All available commands AssertTitle Yahoo!) 4. In the search input button, Type "energy efficient" 5. Click on the "Web Search" submit button 6. Wait for Search Results to come on "http:/search.yahoo.com" 7. Assert the browsers title has the value "energy efficient - Yahoo! Search Results" ( This will make sure you are in the search results page of Yahoo To do this step anywhere in the white space right click Show All available commands AssertTitle energy efficient - Yahoo! Search Results) 8. Verify "energy efficient" text is present anywhere in the search results. (To do this step Select and highlight anywhere in the search results page, "energy efficient" text is present.) 9. End.

After finishing your recording:


1. Stop recording 2. Save the test case by going Selenium IDE File Save Test Case As TC_Yahoo_EE.html 3. Run the test case 4. Review the test case 5. Fix any errors 6. Save the updated test case

2010 Kavin School - http://www.kavinschool.com


Page 3

Simple Selenium IDE Test Suites Exercises Sheet

2. Google Energy Efficient Test Case


Actual Test Case Steps:
1. Open Firefox Browser 2. Open Selenium IDE and minimize 3. In the address bar, Type http://www.google.com/ 4. AssertTitle Google ( - This will make sure you are in the home page of Google To do this step anywhere in the white space right click Show All available commands AssertTitle Google) 5. In the search input button, Type "energy efficient" 6. Click on the "Google Search" submit button 7. Wait for Search Results to be shown in the next page 8. Assert the browsers title has the value energy efficient - Google Search" (- This will make sure you are in the search results page of Google. To do this step anywhere in the white space right click Show All available commands AssertTitle energy efficient - Google Search) 9. Verify Energy Efficient" text is present anywhere in the search results. (To do this step Select and highlight anywhere in the search results page, " Energy Efficient" text is present.) 10. End.

After finishing your recording:


1. Stop recording 2. Save the test case by going Selenium IDE File Save Test Case As TC_Google_EE.html 3. Run the test case 4. Review the test case and fix any errors a. Option 1 i. Fast to slow b. Option 2 i. setSpeed c. Option 3 i. pause d. Option 4 i. Change AssertTitle to waitForTitle ii. Change VerifyTextPresent to waitForTextPresent 5. Save the reviewed test case

2010 Kavin School - http://www.kavinschool.com


Page 4

Simple Selenium IDE Test Suites Exercises Sheet

3. GE Energy Efficient Test Case


Actual Test Case Steps:
1. Open Firefox Web Browser 2. Open Selenium IDE and minimize 3. In the address bar, Type http://www.ge.com/ 4. AssertTitle GE : imagination at work ( - This will make sure you are in the home page of GE website To do this step, anywhere in the white space of GE site right click Show All available commands AssertTitle GE : imagination at work) 5. In the search input button, Type "energy efficient" 6. Click on the "Search" submit button 7. Wait for Search Results to be shown in the next page 8. Assert the browsers title has the value GE: Search Results" (- This will make sure you are in the search results page of GE. To do this step, anywhere in the white space of the results page and right click Select Show All available commands AssertTitle energy efficient - Google Search) 9. Verify Energy Efficient" text is present anywhere in the search results. (To do this step Select and highlight anywhere in the search results page, Energy Efficient" text is present.) 10. End.

After finishing your recording:


1. Stop recording 2. Save the test case by going Selenium IDE File Save Test Case As TC_GE_EE.html 3. Run the test case 4. Review the test case and fix any errors 5. Save the reviewed test case

2010 Kavin School - http://www.kavinschool.com


Page 5

Simple Selenium IDE Test Suites Exercises Sheet

4. Creating Energy Efficient Test Suite


Test Suite Creation Steps:
1. 2. 3. 4. 5. 6. Open Firefox Web Browser Open Selenium IDE Selenium IDE File Open TC_Yahoo_EE.html (Ctrl+O) Selenium IDE File Add Test Case (Ctrl+D) Select TC_Google_EE.html Selenium IDE File Add Test Case (Ctrl+D) Select TC_GE_EE.html Save the test suite by going Selenium IDE File Save Test Suite TS_EE.html

After creating your test suite:


1. Run the test suite 2. Review the test suite and fix for any errors 3. Save the reviewed test suite

2010 Kavin School - http://www.kavinschool.com


Page 6

Simple Selenium IDE Test Suites Exercises Sheet

5. GE Feedback & Inquiries Test Case


Test Case Creation Steps:
1. Open Firefox Web Browser 2. Open Selenium IDE and minimize 3. In the address bar, Type http://www.ge.com/ and on that page do the following a. assertTitle GE : imagination at work b. Go all the way down, click on the Contact Information link 4. Click on Feedback & Inquiries link 5. Wait for the Feedback & Inquiries page to load, then do the following on that page a. waitForTitle Feedback & Inquiries : Contact Information : GE b. Select Consumer/Other (Leave the default option) c. Select a Subject (Other) d. Select a Country (U.A.E) e. Email (type xxx@yyyy.com) f. Comments or Questions (type Just testing) g. Submit (click once) 6. In the result Thank You Page do the following a. waitForTitle GE : imagination at work b. highlight "Thank You" and right click and Select waitForTextPresentThank You" c. highlight Thank you for taking the time to contact GE and Right Click and Select verifyTextPresentThank you for taking the time to contact GE d. Highlight Feel free to continue browsing. and right Click and Select VerifyTextPresentFeel free to continue browsing. e. Right Click on GE.com Home Page link and Select verifyElementPresentlink=GE.com Home Page 7. End.

After finishing your recording:


4. Stop recording 5. Save the test case by going Selenium IDE File Save Test Case As TC_GE_FI.html 6. Run the test case 7. Review the test case and fix any errors 8. Save the reviewed test case

2010 Kavin School - http://www.kavinschool.com


Page 7

Simple Selenium IDE Test Suites Exercises Sheet

6. Creating GE Test Suite


Test Suite Creation Steps:
1. 2. 3. 4. 5. Open Firefox Web Browser Open Selenium IDE Selenium IDE File Open TC_GE_EE.html (Ctrl+O) Selenium IDE File Add Test Case (Ctrl+D) Select TC_GE _FI.html Save the test suite by going Selenium IDE File Save Test Suite TS_GE.html

After creating your test suite:


1. Run the test suite 2. Review the test suite and fix for any errors 3. Save the reviewed test suite

2010 Kavin School - http://www.kavinschool.com


Page 8

Vous aimerez peut-être aussi