Step Types
Navigate
Navigates to the given URL. You can also set your cookies here. Doing so will navigate with the cookies you have set.
Click
Moves the mouse on the target element, then clicks.
Under advanced settings, you can change the click type to be either a right click or a double click. You can also choose your click to be repeated. Preflight will click the amount you have specified.
Type
Type text, usually into an input, textarea, etc.
Select
Selects the value you provide from a <select list. It is usually a dropdown like so:
Checkpoints
Text Checkpoint
Checks the content of an element to see if the initial test condition matches. You can also use checkpoints to store your variables. To do that, you need to define your checkpoint as a grab value. Doing so will make Preflight store your value as {{checkpoint(n)}}
. n
is the numerical value of your checkpoint. For example, your first grabbed checkpoint value would be {{checkpoint(1)}}
, and your second would be {{checkpoint(2)}}
and so on.
If you are adding a step as a Checkpoint and you see no checkbox for grabbing the value, We would suggest that you re-record your test with including the new checkpoint you would like to add.
Visual Checkpoint
Currently, you have to re-record to change your source visual. To change the allowed difference between your source and the result, change Max Allowed Difference
. This will be in percentage points. If it is set at 5 (default value) when the difference is 95% or below, you will get an error. Your Visual Check Result
will be under your test result.
If your original image was recorded on a screen size different from your test settings, Preflight will replace the source of the visual to fit the test settings after a result.
File Upload
Uploads a file to a file upload input.
Send Browser Location
Sends a Geolocation to the website. You can choose wherever you want to send to the website.
Run Javascript
Runs the javascript on the current page in the targeted element. For methods and tutorials check here
Webcam
Simulates a webcam using a video feed. The video feed needs to be a direct URL of the video.
Email Action
An Open
Email Action will open the latest email sent to the test email address.
Preflight will find the email with the subject that is closest to the subject that you have provided. If you don't provide a subject, your test will most likely slow down as Preflight might wait until it is confident enough.
A Close
Email Action will close the email. If you need to store a value from an email, use Checkpoints.
Drag & Drop
This will allow you to drag an element to the target element.
Hover
Hover the target element.
Press Key
Press keys. It can be any key you want as well as combined keys such as: Ctrl + S
Not supported
Conditional Operators
We don't have conditional operators but we have workflows in which you can run tests one after another. Workflows allow you to set up tests in a way that the condition you want is always there instead of doing conditional operators.
The problem with conditions in a test is it makes them unstable. Since you are relying on a dataset that's presented but not built to run in a specific way to test a specific scenario.
For example:
If the input's value is `apple`, do something
If the input's value is `orange`, do something else
Else do nothing
In this scenario above, we don't handle the value strawberry
and it will break the test.
Instead, we can use Preflight's Workflows to use two tests to re-utilize and test exactly Apple
and Orange
differently
Workflow - Slice the Apple
:
- Create a product named
Apple
- Slice the
Apple
As you can see, you make sure the second test always gets Apple. The good thing is we can re-utilize the first test in another workflow.
Workflow - Squeeze the Orange
:
- Create a product named
Orange
- Squeeze the
Orange