AppNeta supports a large subset of “Selenese” commands as shown below. See the official Selenium command reference for a full description of these commands. Descriptions of AppNeta-specific commands can be found here.

Selenium actions

Selenium actions are commands that manipulate the state of the web app.

Each Selenium action can be used with or without the ‘AndWait’ suffix. So, for ‘addSelection’, as an example, the following are available:

  • addSelection
  • addSelectionAndWait

Selenium actions include:

  • addSelection
  • altKeyDown
  • altKeyUp
  • answerOnNextPrompt
  • break
  • captureEntirePageScreenshot
  • check
  • chooseCancelOnNextConfirmation
  • chooseOkOnNextConfirmation
  • click
  • clickAt
  • close
  • contextMenu
  • contextMenuAt
  • controlKeyDown
  • controlKeyUp
  • createCookie
  • deleteAllVisibleCookies
  • deleteCookie
  • doubleClick
  • doubleClickAt
  • focus
  • goBack
  • keyDown
  • keyPress
  • keyUp
  • metaKeyDown
  • metaKeyUp
  • mouseDown
  • mouseDownAt
  • mouseDownRight
  • mouseDownRightAt
  • mouseMove
  • mouseMoveAt
  • mouseOver
  • mouseUp
  • mouseUpAt
  • mouseUpRight
  • mouseUpRightAt
  • open
  • openAuthenticated
  • refresh
  • removeAllSelections
  • removeSelection
  • runScript
  • select
  • selectFrame
  • setCursorPosition
  • shiftKeyDown
  • shiftKeyUp
  • submit
  • type
  • uncheck
  • waitForCondition
  • waitForFrameToLoad
  • windowMaximize

The ‘AndWait’ suffix does not apply to the following commands as they do not result in browser navigation change:

  • echo
  • pause
  • setSpeed
  • setTimeout
  • setUserAgent
  • store
  • waitForPageToLoad

Selenium accessors/assertions

Selenium accessors are commands that examine the state of the web app and store the results in variables (e.g., storeAlert). Assertions verify the state is what is expected (e.g., assertAlert, verifyAlert, and waitForAlert).

Selenium accessors can have a ‘not’ prefix and/or one of the following prefixes: ‘store’, ‘assert’, ‘verify’, ‘waitFor’. So, for ‘alert’, as an example, the following are available:

  • storeAlert
  • storeNotAlert
  • assertAlert
  • assertNotAlert
  • verifyAlert
  • verifyNotAlert
  • waitForAlert
  • waitForNotAlert

Selenium accessors include:

  • alert
  • alertPresent
  • allButtons
  • allFields
  • allLinks
  • allWindowIds
  • allWindowNames
  • allWindowTitles
  • attribute
  • bodyText
  • checked
  • confirmation
  • confirmationPresent
  • cookie
  • cookieByName
  • cookiePresent
  • editable
  • elementHeight
  • elementIndex
  • elementPositionLeft
  • elementPositionTop
  • elementPresent
  • elementWidth
  • eval
  • htmlSource
  • location
  • prompt
  • promptPresent
  • script
  • selectOptions
  • selectedId
  • selectedIds
  • selectedIndex
  • selectedIndexes
  • selectedLabel
  • selectedLabels
  • selectedValue
  • selectedValues
  • somethingSelected
  • speed
  • text
  • title
  • value
  • visible
  • xpathCount

Key representations for keyDown and keyPress

The keyDown and keyPress commands take a key representation as an argument. The key representations can be found here. It is important to note that the representation shown on this page is not what is used as an argument to these commands. For example, the ENTER key is represented as u’\ue007’ but must be specified as \e007 in Selenium. When used in the script editor, it looks as follows:

keyDown-example.png

AppNeta-specific Selenium commands

blacklistUrl( url )

(supported in Chrome only)
Stops the browser from requesting content from the specified url. This is typically used so that traffic generated by Experience monitoring scripts does not affect marketing statistics. In addition, it ignores the load time of secondary resources (for example, advertising) that do not impact the ability of a user to interact with a given page.

Arguments:

url - The URL to be blacklisted. It can be an exact URL or a pattern as specified here. Badly formatted patterns are ignored. Blacklisted URLs specified with this command are in addition to the list of system-defined blacklisted URLs. The user-defined blacklist is reset at the start of each new test.

openAuthenticated( url, username:password )

Provides a convenient way to access a site that uses basic access authentication or NT LAN Manager (NTLM) authentication. Be aware that, if a redirect occurs after login, credentials will be lost.

Arguments:

url - the URL to open
username - the user name to login with
password - the password to login with

selectActiveWindow( )

(supported in Chrome only)
Switches script execution to a newly spawned tab.