Rainforest Automation - Actions & Assertions Overview

RFA (Rainforest Automation) is built on Actions/Assertions and Targets.  Think of them as verbs and nouns. Click (Action / Verb) on the Red button (Target / Noun)

This article will will discuss Actions/Assertions (verbs) within RFA.

RFA supports Standard Actions and Embedded Test (previously known ad Custom Actions). Standard Actions are the building blocks used to build tests. Actions such as Click, Fill, Navigate which mimic how a human would interact with your site.

In additional to standard actions there are also assertions such as See, Disappear that are used to validate the state of an element.

Embedded Tests
Custom Actions
has been replaced with Embedded Tests. Embedded tests for RFA function the same way that  traditional Rainforest Embedded Tests.  Any test created in RFA may be embedded into any other RFA test.  You may NOT embed a test that embeds a test itself (only one level of embedding).  

Embedding a test is beneficial for steps that are used in several tests, such as logging in, creating an account etc.  

NOTE: If you had previously used Custom Actions, you will see that they are no longer  listed separately on the Test page.  Available tests for embedding are included in the Select action or embed a test pulldown on the right of the RFA Test Writing page.

Standard Actions Overview

There are over twenty standard actions available, with more becoming available.

Actions provide half of the information needed. In addition to the action itself, RFA needs to know the item that the action is being taken upon. This is referred to as the Target or Element, which are images matched on a grayscale.

Note:
Image matching is done using grayscale and not color values. Greyscale is used so the imaging matching is more resilient. Color matching cannot be reliably tested today. If specific color matching is necessary for the test, RFA should not be used.

Standard Actions

Click

Clicks on a specific element on the page
MODIFIER (optional)
 
Default - Left
 
Options - Right, Double
Requires selection of a Target / UI Element

Type

Allows for text to be entered into a selected element
Type is equivalent to pressing several keys on the keyboard. May be used when a field is already selected (via click) or if you want to trigger an additional keyboard-controlled action.
Requires a text value
NOTE: prior step needs to be Click for Type to work properly

Fill 

Fills text file with specific content you provide.
Combines Click and Type into a single step. Use Fill to click on something and then type in it such as a search box.
Requires selection of a Target / UI element and a text value

Press Key 

Sends a single key or key combination
MODIFIER (optional): Additional key that is sent at the same time to modify the action. To add a modifier, type it into the MODIFIER field. 

A Key is always a single actual key - but may be several characters to represent. Along with a, b, c, 1, 2, 3 the following are also acceptable:
     CapLock, Tab, ArrowDown, ArrowUp, ArrowLeft, ArrowRight, PageDown, PageUp,
     Escape, Home, End, Delete
     
Backspace - when in a text box, deletes one character from current cursor location
     Enter - please use Enter instead of Return
     
NOTE: Each name currently has to be entered into the UI exactly as spelled above;
     CamelCase is expected (i.e. no spaces and the first letter of each word capitalized).

Modifier is optional and should be left blank if not needed
     Control, Alt, Tab, Shift

  Some common examples:
     ACTION                  KEY      MODIFIER
     New Tab                  
t            Control  
     Copy                        
c           Control
     Paste                        
v           Control
     Open File                
o           Control
     Focus Next              
Tab      
     Focus Previous      
Tab        Shift
     !                                 1            Shift
     M                              m           Shift    

NOTE: Currently does not support three key combinations such as "Control, Shift, Delete" combo

All the key names we accept are specified in section “6.3.2 Key Identifiers Set” at this link:
https://www.w3.org/TR/2009/WD-DOM-Level-3-Events-20090908/#keyset

Dropdown Select 

Selects a specific item from a dropdown
Combines Hover and Click into a single step.
Requires selection of two Target / UI Elements:

  • First Target / UI element - Element to click to activate the dropdown
  • Second Target / UI element - Element (option) to select from the dropdown
    NOTE: If the second Target / UI element is not easily visible (long scrolling list), Dropdown Select will not work.

Checkbox Check 

Checks (selects) a specific checkbox
Requires selection of a Target / UI Element
When capturing the Target / UI element, two criteria must be met

  • The center of the capture box MUST be over the checkbox you wish to select
  • The capture box MUST capture something unique so it can find the correct box. Such as text or other element

Checkbox Uncheck 

Unchecks (deselects) a specific checkbox
Requires selection of a Target / UI Element
When capturing the UI element, two criteria must be met

  • The center of the capture box MUST be over the checkbox you wish to select
  • The capture box MUST capture something unique so it can find the correct box. Such as text or other element
    NOTE: when capturing the UI element, the box that is to be unchecked should be selected (CHECKED) during the element capture

Refresh 

Refreshes the current page
Refreshes (reloads) the current page. Nothing else needs to be specified.
NOTE: if there are issues with the site where popups inconsistently appear, using Refresh may help to normalize

Navigate 

Navigates to a specific URL
Requires a specific URL

Navigate New Tab 

Navigates to a specific URL in a new tab
Requires a specific URL

Navigate Incognito Tab 

Navigates to a specific URL in a new incognito tab
Requires a specific URL

Close Tab 

Closes current browser tab

Scroll 

Scrolls the current page in specified direction
Use when the requested Target / UI element is not initially viewable (is elsewhere on the page) such as at the bottom. Used when the page is long and scrolls top / bottom or left / right.

Requires two items:

  • Direction to scroll: UP, DOWN, LEFT, RIGHT (from current position)
  • Target / UI element to locate

Sleep

Pauses action in the automation to ensure that the entire page has loaded or provides time for some other item of the page to complete.  
Example if it takes several seconds to process or place an order - use SLEEP to ensure that those actions have completed prior to moving onto next step.
Requires entry in SECONDS

Drag and Drop 

Drags and Drops an item
Used to select an item and note where the item is to be moved to

Requires two items:

  • Object: Target / UI element to be selected and moved
  • Target: Target / UI element where the Object is to be moved to

NOTE: Target screen capture should show what the "drop" area looks like PRIOR to the Object being moved to it.

Click and Hold

Selects a target and holds it (keeps mouse button down) for set amount of time

Requires two items:

  • Target / UI element to select
  • Time in Seconds to hold

Plain Language (action) 

Any action that is not reproducible from above
This would be any item that cannot be broken down into the above actions. Items such as "Compare A and B", "change the date from today" etc.
NOTE: any test that has Plain Language cannot be executed by automation

Assertions

There are four assertions at the bottom of the actions list. These are used to validate the current state. They are similar to an action but are used to check on a target as compared to acting on a target.

  • See
  • Disappear
  • Loaded
  • Pain Language Assertion

See

Confirms that an element is present.
Such as a graphic that notes "Congratulations"
Requires selection of a Target / UI Element

Disappear

Confirms that an element is not present. Opposite of See
Such as a graphic that notes "Congratulations"
Requires selection of a Target / UI Element

Loaded

Confirms that a specific page has loaded
Requires a specific URL

Plain Language Assertion

Allows for review of current page, state.
Requires specific instructions to be reviewed by the Rainforest crowd such as make sure the value shown is between 7 and 15.
NOTE: any test that has Plain Language Assertion cannot be executed by automation 

Did this answer your question?