Skip to content

Actions

An action step does one thing a person would do. Every example on this page is a sentence Belay understands as written.

Name one of the project’s routes, or give a path or a full address.

Go to the shop page.
Go to /repairs/book.
Go to https://example.com/pricing.

A path is added to the environment’s base URL, so the same step works on staging and production.

“Click”, “open”, “tap”, and “press” a control all click it.

Click the Save button.
Click the Add to cart button on the "Trail Helmet" card.
Click the first "Rent" button.

When a click opens a link in a new tab, the run follows it: the steps after it are on the new tab.

Enter "Robin Lee" into the Name field.
Type "helmet" in the Search box.
Enter {{email}} into the Email field.
Clear the Search box.

{{email}} inserts a variable.

Name the dropdown and the option.

Choose "Large" in the Size dropdown.

For checkboxes, radio buttons, and switches. A box that is already in the state you ask for is left alone, and the step then confirms the state.

Tick the "Add a helmet" checkbox.
Untick the "Email me offers" checkbox.
Turn on the "Notify me" switch.
Hover over the Account menu.
Focus the Search box.

Name the field to press the key in, or leave it out to press the key wherever the focus is.

Press Enter in the Search box.
Press Escape.
Press Tab.

The keys are Enter, Escape, Tab, Shift+Tab, Backspace, Delete, Space, the arrow keys, Page Up, Page Down, Home, and End. For the last two, write “the Home key” and “the End key”, since “Home” alone could be a link.

Scroll to the Reviews section.
Scroll to the end of the page.

You rarely need this. Belay scrolls to an element before it acts on it.

A run starts with a window of 1280 × 800. Use “mobile” (375 × 667), “tablet” (768 × 1024), or “desktop” (1280 × 800), or give a size. The size stays until a later step changes it.

Set the window to mobile size.
Set the window to desktop size.
Set the window to 1280x900.
Reload the page.
Go back to the previous page.

Write “to the previous page”. “Go back” alone is read as a click on something named Go back.

Belay waits a moment for the page to settle after each action: up to about two seconds, and up to about ten while the page shows that it is loading. So most steps need no wait. When something takes longer, wait for what you expect to see.

Wait until the "Order placed" message is shown.
Wait until the spinner is gone.

A fixed pause works too, but waiting for something on the page is faster and more reliable.

Wait 3 seconds.

For a cookie banner or a notice that appears on some visits and not others. If it is shown, Belay closes it. If it is clearly not there, the step is skipped and says so. If Belay cannot tell, the step ends Not found.

Close the cookie banner if it is shown.

Read a value the page shows and use it in later steps. See Values in steps.

Remember the ticket number in the Repair booked banner as {{ticketNumber}}.

A step that asks for one of these is marked Not supported yet and the workflow cannot run until it is changed.

  • Uploading a file.
  • Dragging and dropping.
  • Accepting or dismissing a browser dialog (an alert or a confirm box the browser itself draws).
  • Opening a new tab yourself, switching tabs, and closing a tab.
  • Key combinations other than Shift+Tab, such as Ctrl+A, and pressing a key several times in one step.

Two more things to know:

  • Elements inside a frame that comes from another site, such as an embedded payment form, cannot be reached. A step that names one is understood when it is saved, and ends Not found when it runs.
  • Double-click and right-click are read as an ordinary click. Check the step’s reading before relying on one.