Skip to main content

Working with Flows

Learn how to create, configure, and execute test flows for automated web application testing with Rock Smith.

What Are Test Flows

Test Flows are reusable test scripts that define a sequence of actions and assertions for testing web applications. Unlike traditional selector-based testing, Rock Smith flows use semantic element targeting—identifying elements by their visual appearance and context rather than brittle CSS selectors.

Each flow consists of:

  • Steps: Individual actions the AI agent performs (clicking, typing, navigating)
  • Assertions: Validation checks that verify expected outcomes
  • Element Targets: Semantic descriptions of UI elements with visual cues

Creating Flows

Rock Smith offers two ways to create test flows:

Manual Creation

Manual Test Flow Creation example

Define a test flow from scratch with full control over each action and assertion. Steps are added after the flow is created.

  1. Navigate to Flows in the sidebar
  2. Click New Flow
  3. Select a project from the Project workspace dropdown
  4. Enter flow details:
    • Flow name (required) - A descriptive name for this test flow
    • Target URL (optional) - The starting URL for this test flow
    • Description (optional) - A brief description of the test scenario
  5. Click Create flow
  6. Add steps using the step editor:
    • Select an action type
    • Configure action parameters in the Action tab
    • Define element targets in the Target tab (for interaction actions)
    • Add assertions in the Checks tab

Step Editor

The step editor provides a comprehensive interface for configuring each step in your flow.

The editor includes:

  • Step Name (required): A descriptive name for this step
  • Action Type: Select from 19 available action types
  • Description (optional): Additional context about what this step does

Editor Tabs

TabPurpose
ActionConfigure action-specific parameters (e.g., scroll direction, URL to navigate, text to type)
TargetDefine semantic element targeting for interaction actions
ChecksAdd assertions to validate expected outcomes
Edit Step Parameters dialog showing the tabbed interface

Generate from Discovery Data

Automatically generate test flows from completed discovery sessions. This method uses the visual contexts captured during discovery to create comprehensive test flows with assertions.

  1. Run Discovery Sessions on your site first
  2. Navigate to Flows > Generate Flow
  3. Select the target project from the dropdown
  4. Review the Project Discovery Data:
    • Completed Sessions
    • Visual Contexts
    • Existing Flows
  5. Click Generate Flows
  6. Flows are generated asynchronously in the background
Generate Test Flows from Discovery Data

What gets generated:

  • Test flows from ALL completed discovery sessions in the project
  • Flows use captured visual contexts for assertions
  • Generation runs asynchronously in the background

Rock Smith organizes flows in a hierarchical tree structure, making it easy to manage large test suites.

Flow Tree Navigator

The Flow Tree Navigator provides:

  • Hierarchical organization: Parent flows with their edge case variations nested beneath
  • Quick navigation: Search and jump to any flow using the navigator popover
  • Step counts: See how many steps each flow contains at a glance
  • Expand/Collapse: Manage visibility of flow groups

Flow Structure

Steps and Actions

Each step in a flow performs a single action. Rock Smith supports 19 action types organized into five categories:

ActionDescriptionParameters
navigateGo to a specific URLurl (required), open_in_new_tab, wait_for_navigation, timeout
go_backNavigate to the previous pageNone
scrollScroll the page or elementdirection (down/up), pages (number of pages to scroll)
switch_tabSwitch to a different browser tabNone
close_tabClose the current browser tabNone

Interaction Actions

These actions require element targeting to identify which element to interact with.

ActionDescriptionParameters
clickClick on an elementElement target only
double_clickDouble-click on an elementElement target only
right_clickRight-click on an elementElement target only
hoverHover over an elementElement target only

Input Actions

These actions require element targeting and additional input parameters.

ActionDescriptionParameters
typeType text into an input fieldtext (required), clear_first (clear field before typing)
select_optionSelect an option from a dropdownoption_text (required)
upload_fileUpload a file to a file inputElement target only
submit_formSubmit a formElement target only
send_keysSend keyboard keyskeys (e.g., "Enter", "Tab", "Escape")
searchPerform a search actionquery (required), engine (google, bing, etc.)

Page Actions

ActionDescriptionParameters
extractExtract data from the pagequery (what to extract), extract_links, start_from_char

Control Actions

ActionDescriptionParameters
waitWait for a condition or durationduration (seconds), wait_for_element, condition, timeout
doneMark the flow as completeNone
customExecute a custom actioninstruction (natural language description)

Action Parameter Details

Navigate Parameters:

  • url: The URL to navigate to
  • open_in_new_tab: Open the URL in a new browser tab
  • wait_for_navigation: Wait for the page to fully load before continuing
  • timeout: Maximum time to wait for navigation (1-60 seconds)

Type Parameters:

  • text: The text to type into the input field
  • clear_first: Clear existing text before typing (useful for editing existing values)

Scroll Parameters:

  • direction: Scroll down (default) or up
  • pages: Number of viewport pages to scroll (e.g., 1.5 scrolls one and a half pages)

Wait Parameters:

  • duration: Fixed time to wait in seconds (max 60 seconds)
  • wait_for_element: Wait for an element to appear instead of a fixed duration
  • condition: Natural language description of the condition to wait for
  • timeout: Maximum time to wait before failing (1-60 seconds)

Extract Parameters:

  • query: Description of what data to extract from the page
  • extract_links: Also extract links from the page
  • start_from_char: Start extracting from a specific character position

Search Parameters:

  • query: The search query to execute
  • engine: Search engine to use (google, bing, duckduckgo, etc.)

Semantic Element Targeting

Rock Smith identifies elements using natural language descriptions enhanced with contextual information—not CSS selectors that break when UI changes.

Element Context Fields

For actions that interact with elements (click, type, select, etc.), you define the target using these fields:

FieldDescriptionExample
LabelSemantic description of the element"Submit button", "Email input field", "Settings menu item"
PositionLocation on the page"top-right corner", "below the form", "in the navigation bar"
TextVisible text content"Sign In", "Enter your email", "Learn More"
TypeElement type"button", "input", "link", "dropdown", "checkbox"

Writing Effective Element Descriptions

Describe elements as a user would see them:

  • "The blue Submit button below the form"
  • "The email input field with placeholder 'Enter your email'"
  • "The navigation menu item labeled 'Settings'"
  • "The red Delete button in the top-right corner"

Tips for reliable targeting:

  • Be specific but flexible: "Submit button in the login form" rather than just "Submit button"
  • Include visual context: Add color, position, or icon cues when multiple similar elements exist
  • Avoid implementation details: Don't reference CSS classes or IDs in descriptions
  • Use visible text: Reference button labels, link text, or placeholder text when available

Self-Healing Tests

Because semantic targeting describes elements by appearance and context, tests automatically adapt when UI changes. If a button moves or changes styling, the AI still finds it based on the semantic description.

Assertions

Assertions validate that your application behaves as expected. Add assertions to any step to verify outcomes.

Available Assertion Types

Assertion TypeDescription
visual_verificationVerify the visual state of the page or element
element_visibleCheck that an element is visible
element_hiddenCheck that an element is hidden
element_existsCheck that an element exists in the DOM
text_visibleVerify specific text is visible on the page
url_matchesVerify the current URL matches a pattern
url_not_matchesVerify the current URL does not match a pattern
page_titleVerify the page title
navigation_occurredVerify that navigation happened
accessibility_checkRun an accessibility validation
performance_metricCheck a performance threshold
customCustom assertion with natural language description

Adding Assertions

  1. Open a flow step
  2. Click Add Assertion
  3. Select the assertion type
  4. Provide a description of what to verify
  5. Save the step

Running Flows

Once you've created a flow, you can view its details and execute it to test your application.

Flow Details Page

The flow details page shows:

  • Flow name, description, and priority
  • Tags for organization
  • Target URL where the test begins
  • Step Timeline with all steps, their action types, parameters, and assertions

Execute a Flow

  1. Open a flow from the Flows list
  2. Click the Run button in the top-right corner
  3. Configure execution options in the dialog:

Run Test Flow Dialog

  • Browser Profile: Choose a persistent profile to preserve cookies and session data, or use the default temporary profile
  • User Persona: Select a persona to influence test behavior and interactions (e.g., simulate different user types)
  1. Click Run Test

Real-Time Monitoring

During execution, monitor progress in real-time:

Live Execution Session

The live execution view includes:

  • Live Browser View: Watch the AI interact with your application in real-time
  • Step Results: Track pass rate and see which steps have completed
  • Test Persona: View the active persona influencing test behavior
  • Agent Progress Panel: See what the AI is currently doing

Agent Reasoning

The Agent Progress panel displays the AI agent's reasoning as it executes each step:

  • Action: Current action being performed
  • Next: The upcoming step in the flow
  • Agent Thinking: The AI's reasoning about what it observes and how to proceed
  • Evaluation: Success or failure verdict for each step

This transparency helps you understand how the agent identified target elements, why certain actions were taken, and what the agent observed on the page.

Execution Results

After a flow completes, review detailed results:

Step Results

Each step shows:

  • Status: Pass, fail, or skipped
  • Screenshot: Visual state at that step
  • Duration: Time taken to complete
  • Agent Reasoning: AI explanation of actions taken
  • Assertion Results: Individual pass/fail for each assertion

Execution History

Access past executions to:

  • Compare results over time
  • Identify flaky tests
  • Track improvements or regressions
  • Export results for analysis

Best Practices

Flow Design

  • Keep flows focused: Test one user journey per flow
  • Use descriptive names: "Login with valid credentials" not "Test 1"
  • Add meaningful assertions: Verify actual outcomes, not just navigation
  • Use semantic descriptions: Describe elements as users see them

Element Targeting

  • Be specific but flexible: "Submit button in the login form" rather than just "Submit button"
  • Include visual context: Add color, position, or icon cues when elements are similar
  • Avoid implementation details: Don't reference CSS classes or IDs in descriptions

Maintenance

  • Review failed tests: Use agent reasoning to understand failures
  • Update descriptions: If UI changes significantly, update element descriptions
  • Organize with projects: Group related flows together
  • Use discovery sessions: Let AI identify elements when building new flows

Next Steps