List of commands

CommandDescription
I.goToNavigate to a URL
I.refreshPageRefresh a page
I.switchTabSwitch to a tab
I.closeTabClose the current tab

Page Assertion Commands

CommandDescription
I.amAtAssert that the browser is at a specific URL
UI.isStatusCodeAsserts that the status code for the current page is a specific status code.
UI.isNotStatusCodeAsserts that the status code for the current page is NOT a specific status code.
UI.is200Asserts that the status code for the current page is 200 (OK).
UI.isNot200Asserts that the status code for the current page is NOT 200 (OK).
UI.is404Asserts that the status code for the current page is 404 (Not Found).
UI.isNot404Asserts that the status code for the current page is NOT 404 (Not Found).
UI.is500Asserts that the status code for the current page is 500 (Internal Server Error).
UI.isNot500Asserts that the status code for the current page is NOT 500 (Internal Server Error).

Form Input Commands

CommandDescription
I.fillFill a text field with a value
I.selectSelect a dropdown / checkbox / radio button
I.deselectDeselect a checkbox
I.uploadUpload a file to a file field

Form Assertion Commands

CommandDescription
I.filledAssert that the form is filled with a specific value
I.selectedAssert that a dropdown option, checkbox, or radio button is selected
I.deselectedAssert that a dropdown option, checkbox, or radio button is NOT selected

Mouse Commands

CommandDescription
I.clickClick on an element
I.doubleClickDouble click on an element
I.rightClickRight click on an element
I.hoverOnHover on an element
I.dragToDrag an element to another target element
I.dragByDrag an element directionally by (x,y) pixel offset
I.dragUpDrag an element to the up by a given number of pixel
I.dragDownDrag an element to the down by a given number of pixel
I.dragLeftDrag an element to the left by a given number of pixel
I.dragRightDrag an element to the right by a given number of pixel
I.scrollByScrolls the page horizontally and vertically by a given number of pixels.
I.scrollUpScrolls the page up by a given number of pixels
I.scrollDownScrolls the page down by a given number of pixels
I.scrollLeftScrolls the page left by a given number of pixels
I.scrollRightScrolls the page right by a given number of pixels
I.scrollToScrolls to a coordinate on the page
I.scrollToTopScroll to the top of the page
I.scrollToBottomScroll to the bottom of the page

Keyboard Commands

CommandDescription

I.type
I.press

Press a key or a string of keys
I.pressEnterPress the Enter key
I.pressUpPress the ↑ key
I.pressDownPress the ↓ key
I.pressLeftPress the ← key
I.pressRightPress the → key
I.pressTabPress the Tab key

Validate Page Content

CommandDescription
I.seeAssert that an text or element is visible
I.dontSeeAssert that an text or element is NOT visible
I.countAssert the number of occurances for a text or element
I.seePageTitleAssert the title of the current page

Page Content Extraction Commands

CommandDescription
I.getCountGet the number of occurances of a text or element
I.getTextGet text content from an element
I.getValueGet value from an input element

| I.getURL | I.getPageTitle | Get the title of the current page |

Read and Validate Page Elements

Element attribute

CommandDescription
UI.getAttributeGet an attribute on an element.
UI.getAttributesGet all attributes on an element.
UI.hasAttributeAssert the presence or the expected value of an attribute on an element.
UI.doesNotHaveAttributeAssert the absence of an attribute on an element, or that the value of an attribute is not equals a given string.

Element class

CommandDescription
UI.hasClassAssert the presence of a CSS class on an element.
UI.doesNotHaveClassAssert the absence of a CSS class on an element.

Element HTML

CommandDescription
UI.getHTMLGet the outer HTML of an element. Alias for UI.getOuterHTML.
UI.getOuterHTMLGet the outer HTML of an element.
UI.getInnerHTMLGet the inner HTML of an element.

Alert Commands

CommandDescription
I.seeAlertAssert that an alert is displayed, and/or that an expected message is displayed on the alert.
I.acceptAlertPress the "Ok" button on the alert
I.cancelAlertPress the "Cancel" button on the alert
I.fillAlertFill the text box on the alert

Utility Commands

CommandDescription
I.waitWait for a given amount of time

Generate Sample Data

CommandDescription
SAMPLE.idGenerates a random string useful for IDs and passwords
SAMPLE.phoneGenerates a random phone number
SAMPLE.lastGenerates a random last name
SAMPLE.firstGenerates a random first name
SAMPLE.nameGenerates a random full name
SAMPLE.emailGenerates a random email address

Loading Test Data From File

CommandDescription
TEST.loadDataFromCsvLoads test data from a .csv file.
TEST.loadDataFromJsonLoads test data from a .json file.

Test Flow Commands

CommandDescription
TEST.runRuns another test
TEST.stopStops the test

Screenshot Commands

CommandDescription
TEST.takeFullScreenshotTake a full page screenshot (Safari & IE only)

Reporting Commands

CommandDescription
TEST.log.infoLog a message to report
TEST.log.passLog a message to report with pass status
TEST.log.failLog a message to report with fail status

Limiting Test Scope

CommandDescription
UI.context

Limit the test to target within specific parts of a page.
Can be used to explicitly switch to the context of an iframe.

Execute Javascript

CommandDescription
UI.executeExecutes Javascript on the browser

HTTP Requests

CommandDescription
UI.httpGetDo a http request with the GET method.
UI.httpPostDo a http request with the POST method.
UI.httpRequestDo a http request.
CommandDescription
UI.COOKIE.setSet a cookie on the current page
UI.COOKIE.isSetAssert the presence of a cookie
UI.COOKIE.isEqualAssert the value of a cookie
UI.COOKIE.deleteDelete a cookie
UI.COOKIE.deleteAllDelete all cookies

Local Storage Management

CommandDescription
UI.LocalStorage.getGet the value of property from local storage
UI.LocalStorage.setSet a property in local storage
UI.LocalStorage.isSetAssert the existance or the value of a item in local storage
UI.LocalStorage.isEqualAssert the value of a item in local storage
UI.LocalStorage.deleteDelete a property in local storage
UI.LocalStorage.deleteAllDelete all properties in local storage

Handling downloaded files

Property / CommandDescription
UI.Downloads.files(Property) Get the list of files
UI.Downloads.listFiles()(Method) Get the list of files
UI.Downloads.hasFile(fileName)(Method) Check for the existance of a downloaded file

Window Resize

CommandDescription
UI.resizeResize the resolution to a specific width and height.
Last Updated: