...
- Right-click the project from the previous exercises, then choose Add New> Test (.tst) File from the shortcut menu.
- Enter a name for the file, then click Next.
- Select Web> Record web scenario and click Next.
- In the first Record Web Scenario wizard page, ensure that Record new web scenario is selected, then click Next.
- Complete the next Record Web Scenario wizard page as follows:
- Enter
Web Functional Testing
in the Test Suite Name field. Enter
localhost:8080/parabank
in the Start Recording From field.Info Internet Explorer Note
If you will be using Internet Explorer to record/playback this test, use the name of the local machine instead oflocalhost
—here and throughout this tutorial lesson.- Ensure that the following options are checked, and the others are not:
- Generate Functional Test
- Generate Asynchronous Request Tests.
- Click the Finish button. The test will begin, and a browser window will open.
- Enter
- Within the browser window that opens, perform the following actions:
- Type
john
in the Username field. - Type
demo
in the Password field. - Click Log In.
- Click the first account number listed in the Accounts Overview page (12345).
- Click Log Out.
- Close the browser to end recording. In the Test Case Explorer view, SOAtest creates a new .tst file and a test suite that contains the scenario that you just recorded.
- Type
- Expand the new test suite node in the Test Case Explorer to view the tests created for each user action taken during the recording.
...
- Expand the Scenario: Web Functional Testing branch to view the recorded actions related to clicking the account number.
- Double-click the Test 3: Click “12345" node to open the test configuration panel.
- Note that the Pre-Action Browser Contents tab shows what the page looked like before the test action (clicking ‘12345’) was performed. It uses a blue border to highlight the user actionfor action for this test.
- In the test configuration panel, open the User Action tab.
- Under the Element Locator section, change Attribute value from Fixed to Parameterized.
- Select Account Number from the menu that appears to the immediate right.
- Click Save to save the changes.
- Run the test. It will now click on the <a> element that has been parameterized with the account number entered in the data source.
...