Tests consist of test actions that should be performed on a tested page.
You can create tests:
This topic provides the steps to record tests.
You can record tests in local browsers. TestCafe detects browsers on the local computer and adds them to the Record Browser drop-down menu. Before recording a test, select the browser from the list.
See Test Directory to learn how to open a test directory.
Recorded tests should be organized into categories called fixtures. A fixture stores data used in the tests: a target page URL and authentication credentials.
You can view and modify a fixture in the Fixture Editor.
To create a new fixture, follow the steps below:
In the Explorer panel, do one of the following:
This invokes the Fixture Properties dialog.
Specify the fixture's properties and click Create.
TestCafe Studio creates a file with a test fixture and adds an empty test to the fixture.
TestCafe Studio automatically creates a new fixture if you start recording a test from the Welcome page.
There are two cases when you can skip this step and go to recording:
To create an empty test:
In the New Test dialog, specify the test name and click Create.
TestCafe Studio creates a test with the specified name and opens it in the Test Editor. Next, add actions from the Actions panel to the test or record actions. To start recording, click Record test actions on the Test Editor's toolbar.
Do any of the following to start recording a new test:
TestCafe Studio creates a new test, adds it to the fixture and starts recording test actions. See During Recording.
To record new actions to an existing test, click Record test actions on the Test Editor's toolbar. If the test already has test actions, TestCafe replays them and waits for you to record new actions.
To stop recording, close the browser or click on the Test Editor's toolbar.
After you click the Record button, TestCafe Studio launches the specified browser and starts recording your activity on the tested page.
You can do the following during test recording:
Record on-page actions (clicks, drags, key presses, etc.) by interacting with the web page. These actions and their parameters are added to the test.
Add actions from the Actions panel to the test.
You can use an element picker to select a target element on the tested page when you add an on-page action or assertion. To do this, click the button in the action parameters' area and click an element on the page.
When you create an assertion, you can also choose a property from the auto-generated property list. See Assertion Parameters.
View and modify the recorded actions. See Modify Tests.
You can view and modify recorded tests in the Test Editor during and after recording.
You can perform the following tasks:
You cannot visually select target elements for actions if you add or modify the actions after recording - you should specify them manually.