Action

Action

Base DSL actions

Constructor

new Action()

Source:

Members

keyDown

Source:

Performs a custom keydown event on a certain element.

keyPress

Source:

Performs a custom keyPress event on a certain element.

typeNewText

Source:

Cleans previously typed text and fill in with a new value.

Methods

(static) bulkCtrlKey(selectors)

Source:

Performs a bulk of Ctrl clicks.

Parameters:
Name Type Description
selectors

(static) bulkShiftKey(selectors)

Source:

Performs a bulk of Shift clicks.

Parameters:
Name Type Description
selectors

(static) clearText(selector)

Source:

Clear text in found element.

Parameters:
Name Type Description
selector

(static) click(selector)

Source:

Clicks on element if it's clickable. For example button can be disabled and click won't occur, you need to fetch that unaccepted behavior earlier.

Parameters:
Name Type Description
selector Object

CSS Selector or Protractor Element

(static) clickEnter(selector)

Source:

Performs an enter on a certain element.

Parameters:
Name Type Description
selector

(static) clickEscape(selector)

Source:

Performs an escape on a certain element.

Parameters:
Name Type Description
selector

(static) clickIfClickable(selector)

Source:

Clicks on element nevertheless if it's clickable or not. You can use it when element is appeared only for some period of time and then disappears. As e2e especially for IE is slow it can happen that Protractor can miss to click on that element during that period of time. For example it can be used to close timed notification messages to proceed further, as toastr might hide some elements which you want to click.

Parameters:
Name Type Description
selector Object

CSS Selector or Protractor Element

(static) ctrlClick(selector)

Source:

Performs Ctrl click on a certain element.

Parameters:
Name Type Description
selector

(static) doubleClick(selector)

Source:

Performs double click on a certain element.

Parameters:
Name Type Description
selector

(static) executeVoidScript(scriptFunction, …scriptArguments)

Source:

Executes native JavaScript function.

Parameters:
Name Type Attributes Description
scriptFunction function
scriptArguments array <repeatable>

(static) focus(selector)

Source:

Focuses on a certain element. Mainly has to be used for input fields.

Parameters:
Name Type Description
selector

(static) hover(selector)

Source:

Hovers on a certain element.

Parameters:
Name Type Description
selector

(static) jsClick(selector)

Source:

Clicks on element by using native JavaScript execution.

Parameters:
Name Type Description
selector Object

CSS Selector or Protractor Element

(static) jsDragAndDrop(fromElement, toElement, waitBeforeDropping)

Source:

Drag the element and drops it to a certain area.

Parameters:
Name Type Default Description
fromElement
toElement
waitBeforeDropping 500

time to wait between drag and dropping the element

(static) shiftClick(selector)

Source:

Performs Shift click on a certain element.

Parameters:
Name Type Description
selector

(static) typeText(selector, text)

Source:

Types a text into a specified element.

Parameters:
Name Type Description
selector
text