Wait Actions
Wait For Element
The ‘WaitForElement’ action is essential to creating your user journey and just as important as a ‘Click’. User Journeys run quite fast. The WaitForElement waits for a specific element to load on your site before proceeding with the next action. For example, you might see this action after clicking through to a new page to ensure everything is loaded before interacting further.
There are four conditions in the WaitForElement you can choose to wait for:
- Clickable
- Visible
- NotClickable
- NotVisible
If you are checking for a button to load we would recommend ‘Clickable’ however if you are checking for text such as an error message to appear we would recommend ‘Visible’.
WaitForElementText
The ‘WaitForElementText’ action instructs a journey to wait until a condition is met on the page text. This can be used for ensuring a page is fully loaded or checking for specific text on a page. For example, you could use this action to check for the words ‘In Stock’ on a product page. There are times when a WaitForElementText is useful but we recommend using a ‘WaitForElement‘ where possible.
You can set the action to wait for three conditions which each offer different possibilities:
- Equal
- Contain
- Match
Once you have entered the text into the ‘Value’ field you can also edit the timeout length and if you want the action to error. If you want the journey to still pass even if the action fails you can set the ‘Error’ status to ‘No’.
Wait For Title
The ‘WaitForTitle’ action instructs a journey to wait until a condition is met on the page title. This is generally used for ensuring a page is fully loaded or checking that the journey has a specific title on the page. For example, you could use this action to check for a specific status or product on a page. Although this action is useful we would recommend using a ‘WaitForElement‘ if possible.
You can set the WaitForTitle to wait for three conditions which each offer different possibilities:
- Equal
- Contain
- Match
Once you have entered the text into the ‘Value’ field you can also edit the timeout length and if you want the action to error. If you want the journey to still pass even if the action fails you can set the ‘Error’ status to ‘No’.
Wait For URL
The ‘WaitForUrl’ action instructs a journey to wait until a condition is met on the page URL. This can be used for ensuring a page is fully loaded or checking that the journey loads a specific page. If the page doesn’t load or the journey isn’t on the page specified the journey will fail.
You can set the WaitForURL to wait for three conditions which each offer different possibilities:
- Equal
- Contain
- Match
Once you have entered the URL in the ‘Value’ field you can also edit the timeout length. If you want the journey to still pass even if the action fails you can set the ‘Error’ status to ‘No’.
Wait
The ‘Wait’ action pauses a journey for a set period of time. We strongly recommend using a ‘Wait for element’ where possible to reduce the likelihood of a failure occurring if a page takes longer to load than expected.
There are however occasionally reasons for a ‘Wait’ if you know how long something takes to load and a ‘Wait for element’ isn’t possible. To add in this action you need to enter the time you want the journey to be paused. Just to note the timings are in milliseconds meaning one second is ‘1000’ and 15 seconds ‘15000’.