Presentation is loading. Please wait.

Presentation is loading. Please wait.

Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.

Similar presentations


Presentation on theme: "Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel."— Presentation transcript:

1 Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel

2 2 Day 1 Practice Test Cases

3  Open Firefox browser Navigate to http://hrm.tehportal.net (*1)  Go to Tools  Selenium IDE (*2) 3 *2 The Record button is ON by default *1

4  Steps: ◦ Login:  username: admin  password: Password ◦ Go to PIM > Employee List ◦ Search by Job Title for “QA Manager” ◦ Verify that the search returns “QA Manager” and does not return QA Engineer or Software Development Manager. ◦ Play back the test and debug until all commands pass (green color) 4

5  Open Selenium IDE and ensure recording is ‘ON’  Make sure you substitute click command with clickAndWait command wherever needed.  (Hint: When a ‘click’ causes the web page to reload)  Use assertNotText command  To assert that specified text is not displayed in the specific HTML element 5

6 Manual Test-CaseAutomated Test-Case Test-Case Objective Ensure search by “job” functions as expected Steps 1) Login 2) View the Employee List 3) Search by Job Title for “QA Manager” 4) Check the search result 5) Log out Expected Result 1) The search returns only managers, and no other employees 6

7  Steps: ◦ Login:  username: admin  password: Password ◦ Click PIM ◦ Click Add button (green button) ◦ Provide First and Last name for the new employee ◦ Click Save button ◦ On the Personal Details page click the Edit button ◦ Verify Middle Name field is editable ◦ Enter a new Middle Name and click Save button ◦ Verify the fields are NOT editable ◦ Logout and Stop recording ◦ Play back the test and debug until all commands pass (green color) 7

8  If the command you are trying to find is not available through the context menu, then select ‘Show All Available Commands” at the bottom of the context menu.  If the command is still not available, then select a similar command to allow Selenium IDE to record the required parameters and after you finished recording, you can manually change the command. 8

9  Use assertEditable command  To ensure a field is enabled and editable  Use assertValue command  If the text of the specific webpage element not embedded between tags, but is specified inside the tag instead TEXT  use assertText  use assertValue 9

10 Manual Test-CaseAutomated Test-Case Test-Case Objective Ensure new employee is added to employee list Steps 1. Login using login: admin & password: password 2. Select PIM > Add Employee menu item 3. Provide First and Last name for the new employee 4. Click Save button 5. On the Personal Details page click the Edit button 6. Assert the fields are editable 7. Enter a new Middle Name 8. Click Save button 9. Assert the fields are NOT editable 10. Assert the Middle Name was saved 11. Logout Expected Result 1) Employee Details can be edited and saved 10

11  Steps: ◦ Login:  username: admin  password: password ◦ Go to PIM > Employee List ◦ Click the ‘Add’ button ◦ Provide First and Last name for the new employee ◦ Store the automatically generated employee code ◦ Type in a random 8 digit employee code (example: 06845234) ◦ Click Save button ◦ Select PIM > Employee List menu item ◦ Perform a search by Employee ID for the new employee using the stored employee code (example: 06845234) ◦ Check that the search returned the correct First and Last name. ◦ Stop recording ◦ Play back the test and debug until all commands pass (green color) 11

12  Use storeValue command (not storeText)  To store the automatically generated employee id in a variable  To use in your code the value stored in a variable, place the variable name in curly brackets with $ sign in front: ${variable_name} Selenium will replace ${variable_name} with the value/text stored within the variable  Find the line in which you manually entered the employee code. Replace the value you entered with ${variable_name} 12

13 Manual Test-CaseAutomated Test-Case Test-Case Objective New employee can be found through search by Emp ID Steps 1. Login 2. Add new employee 3. Provide First and Last name and store the automatically generated employee code 4. Perform a search by Emp ID for the stored employee code Expected Result 1) The search returns only one employee with the correct name 13


Download ppt "Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel."

Similar presentations


Ads by Google