How to Create a Visual Editor Test
Learn how to create, edit, and preview a test without writing any code.
Overview
Creating a Rainforest test with the Visual Editor is easy and doesn’t require any coding. A Visual Editor test is composed of steps. Each step has an action such as Click and Navigate. These steps tell the application how to interact with the page. For a complete list of actions and how they work, see the Visual Editor Test Actions Glossary.
Creating a Test
- Navigate to the All Tests page (paper icon) and click Tests.
- Click the New Test button.
The Create Test modal displays. By default, it is set to the Use an Existing Site tab. - Select a site from the Site Name dropdown.
Note that you can include additional path information in the base URL. If your site doesn’t appear in the dropdown, select the Add a New Site tab and key in the new URL. - Select “Visual Editor” from *How do you want to compose this test?
Note: “Native mobile app” is not supported for the quick capture option. - Click the Create Test button.
![Screen Shot 2022-01-31 at 4.40.57 PM.png 513](https://files.readme.io/1b343d9-Screen_Shot_2022-01-31_at_4.40.57_PM.png)
The Create Test modal.
Pro Tip
Preview a Test in a Different Environment
The Preview feature runs your test using the default environment. Sometimes, however, you might want to use a different environment. For example, your test is written for Staging, but you want to preview it using Production. Here’s how to do it:
- In a new browser tab, go to Settings > Sites.
- Mouse over the Environment you want to test and copy the Environment ID code.
- Return to your test.
- Append
?envId=nnnnn
(where nnnnn is the Environment ID) to the page URL.
Note: envId is case sensitive.Example:
https://app.rainforestqa.com/tests/279538 is updated to
https://app.rainforestqa.com/tests/279538?envId=22312The Start at URL updates to the URL of the environment you specified.
Editing Your Test
- The Virtual Machine (VM) loads and navigates to the starting URL.
It loads the default platform and the URL selected in the Create Test modal. Update the URL by selecting it in the first step and changing the site.
Note: You can add a Navigate step with a new URL as needed. - Name the test.
Click Untitled Test in the upper left-hand corner of the screen and update the test name. Click Save changes anytime. - Add your test steps.
Click “Select action or embed a test.” For a list of actions and how to embed tests, see the Visual Editor Test Actions Glossary. - Continue adding steps until the test is complete.
![Screen Shot 2022-12-01 at 2.55.30 PM.png 2822](https://files.readme.io/33e0435-Screen_Shot_2022-12-01_at_2.55.30_PM.png)
Editing a test.
Capturing and Naming the Element
Each step is composed of an action and an element. The element is the item the action interacts with, such as clicking a button. These elements can be anything but are commonly buttons, input fields, text, labels, and images.
- Click the element in the test step.
- Select an area within the VM to capture by clicking and dragging.
- Recapture the element if needed by clicking Recapture Element and trying again.
- Provide an element name to easily identify what was captured.
![Screen Recording 2022-12-01 at 03.02.34 PM.gif 1408](https://files.readme.io/d988075-Screen_Recording_2022-12-01_at_03.02.34_PM.gif)
Naming an element.
Adding a Value
Some actions require a value, such as a URL or other text. For a complete list of these actions, see the Visual Editor Test Actions Glossary.
- Select the field and provide the information.
- Use test data by selecting “Insert Test Data” from the dropdown. For more information, see Using Test Data.
- To change a value, reselect the field and update.
Note: You can use dynamic and static data together. For example, if you require a random first name and static last name, enter it as {{random.first_name}} Jones
.
![Random Data.gif 557](https://files.readme.io/bdd437c-Random_Data.gif)
Adding test data to the step.
Freezing the Screen
If you need to capture a screenshot of an element that is moving or only appears when the mouse is hovering over it, you can do so by temporarily freezing the Visual Editor’s screen. To create a freeze-frame of the screen:
- Press Control + Shift + F while your mouse is hovered over the VM, or click the “Freeze Screen” button at the top of the VM.
- Capture a screenshot by clicking and dragging in the VM image.
- Press Control + Shift + F or click the “Unfreeze Screen” button to resume the VM preview.
![2022-03-31_10-53-25.gif 1460](https://files.readme.io/f034cbb-2022-03-31_10-53-25.gif)
Freezing the VM screen.
Note: This only freezes the image, not the actual VM. The machine will keep running in the background and once you resume, you’ll see the latest screen state.
Adding, Deleting, Moving, and Copying Steps
Adding Steps
To insert a step:
- Click the plus sign (+) between the actions.
- Choose between “Select Action” or “Embed a Test” and add a step.
To add a step at the end:
- Choose between “Select Action” or “Embed a Test” and add a step.
- Enter the information for the new action.
Deleting a Step
- Select the step to delete by clicking the step number.
- Click Delete at top of the Actions list.
Moving Steps
- Click the equal sign (=) to the right of the step.
- Drag the step up or down to the desired location.
Note: You cannot move steps above the “Start at” step.
Copying Steps
You can copy steps multiple times within a test. See How to Copy Steps for more information.
Save Your Work Often
Saving is not automatic. If you close the window or navigate to a different page, anything that wasn’t saved is lost. If this happens, reload the page to display the most recently saved version.
Preview Actions
Preview Actions plays back the test steps in real-time in the VM on the page’s right-hand side. You can preview the entire test or individual steps.
- If everything behaves as expected, continue adding more actions and previewing them to validate. If not, update the steps as needed.
- To play steps, select the checkboxes to the left of the step and click the Preview Actions button.
To select or deselect multiple steps. Select a step, click and hold Shift, select another step. All steps between the two will be selected (or deselected). - If there are problems matching an element while previewing, a warning is shown in the upper right-hand corner of the screen. You should update the test to increase the stability of the step to ensure passing. If Preview can’t match an element, an error message is shown to help resolve the issue.
- Click actions are highlighted using a ripple effect to indicate the target.
- A 2-second delay is automatically added between actions to increase test stability. See the Visual Editor Test Settings Glossary to change this setting.
- If test data is used, such as random.email, the value in the test is shown in the VM and the VM console.
![click.gif 1409](https://files.readme.io/522aaca-click.gif)
Using Preview Actions to validate test steps.
If you have any questions, reach out to us at [email protected].
Updated 10 months ago