Skip to main content

KaneAI - Command Guide

KaneAI offers a natural language interface for authoring test steps. Each step is expressed as an instruction that KaneAI translates into executable automation. With KaneAAI supported commands you can build clear, dynamic, and human-readable test cases.


ActionExample Commands
Open URLgo to https://example.com , open https://example.com
Clickclick on login button
Type Textenter "user@example.com" , type "password123"
Clear Fieldclear email input field
Select Dateselect 21st september date
Hoverhover on shop by category option
Searchsearch for "laptop"
Refreshrefresh the page
Navigationgo back , navigate back , go forward , navigate forward

Waits & Timeouts

Default Wait

Every element interaction automatically includes a default wait of 10 seconds for the element to become interactable.

Explicit Waits

Define timeouts explicitly using natural language instruction like wait for 5 seconds

Custom Timeouts

You can override waits per step via the UI:

  1. Click step menu (⋮) → Step Timeout
  2. Enter timeout value (seconds, max 300)
note

Custom waits apply only to element-based interactions.


Tab Management

  • open new lambdatest tab
  • switch to 2nd tab / switch to lambdatest tab
  • close lambdatest tab / close 2nd tab

Scrolling

  • scroll until the button is visible
  • scroll by 100px
  • scroll to the bottom / scroll to the top
  • scroll 3 times
  • scroll by 20 percent
tip

Use scroll until for elements not yet visible in the viewport. Works for entire pages and scrollable subsections.


Assertions

Assertions validate expected outcomes. KaneAI supports several categories:

CategoryExample
Driver AssertionsValidate browser state (URL, dimensions).
  • Assert if current URL is https://example.com
  • Validate window height and width
Text AssertionsCheck for presence/absence of text.
  • Assert “Welcome Back!” is visible
  • Assert error message “Invalid password” is displayed
Visual AssertionsConfirm image or logo visibility.
  • Assert company logo appears in header
  • Assert product image is visible
Relative AssertionsValidate element relationships.
  • Assert login button is in same column as username
  • Assert submit & cancel buttons are in same row
Mathematical AssertionsCheck numeric calculations.
  • Assert 3 + 4 = 7
note

Since July 20, 2025, all assertions fail tests immediately by default.
Older tests may still use warn-and-continue until edited.
More info: Failure Conditions


Unsupported (Coming Soon)

The following assertion types are not yet available:

CategoryExampleDescription
Element StateAssert if submit button is disabledDirectly accessing the element state is not supported.
Element PropertyAssert if font size is 16pxDirectly accessing the element properties is not supported.
SpatialAssert the 5th column of the table contains "Jordan.Mathews"This requires to deep knowledge of DOM to understand the positions & arrangements of the elements.
LogicalAssert user is admin AND logged inAssertions combining multiple conditions.
Action-basedAssert tooltip appears after hoverAssertion after an action is performed. These types of instructions can be broken into multiple steps & executed as for now.
Nested AssertionsAssert login button enabled AND welcome message visibleNested assertions involve multiple layers of validation within a single assertion.

Query Information

  • query the current url
  • query the time mentioned in the poster

Conditional Actions

Conditional Click

if pop up is present in the viewport then click on it

Conditional Selection

if price < 200 then click add to cart else select second product


Do's and Don'ts

Do (Good Example)Don’t (Bad Example)
Assert text "Submit" on form footer is visibleAssert that the submit button works and the layout is correct
Assert textbox contains the exact value 'heading1'Assert the textbox has heading (vague, unclear what “heading” refers to)
Assert logo is visible Assert 3 search results are shownAssert logo is visible and 3 results are shown (too many assertions in one)
Use: Assert search results appear after a wait stepWait for search results and then assert they are visible (assertion contains action)
Assert the divider looks redAssert divider color is #ff5733 (too detail‑specific, fragile visual check)
Assert no text in table overflows its cellAssert the page looks well designed (subjective, unclear)

Best Practices

  • Write clear, specific commands
  • Combine command types for richer tests
  • Use conditional logic for dynamic flows
  • Apply waits thoughtfully for stability
  • Always add assertions to validate outcomes

Test across 3000+ combinations of browsers, real devices & OS.

Book Demo

Help and Support

Related Articles