Action

Action

Base DSL actions

Constructor

new Action()

Source:

Members

typeNewText

Source:

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

Methods

(async, static) bulkCtrlKey(selectors)

Source:

Performs a bulk of Ctrl clicks.

Parameters:
Name Type Description
selectors

(async, static) bulkShiftKey(selectors)

Source:

Performs a bulk of Shift clicks.

Parameters:
Name Type Description
selectors

(async, static) clearText(selector)

Source:

Clear text in found element.

Parameters:
Name Type Description
selector

(async, static) click(selector, delay)

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 Default Description
selector

CSS Selector or Protractor Element

delay 1000

Delays on specified time before proceeding further.

(async, static) clickEnter()

Source:

Performs an enter on a certain element.

(async, static) clickIfClickable(selector, delay)

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 Default Description
selector

CSS Selector or Protractor Element

delay 1000

Delays on specified time before proceeding further.

(async, static) ctrlClick(selector)

Source:

Performs Ctrl click on a certain element.

Parameters:
Name Type Description
selector

(async, static) doubleClick(selector)

Source:

Performs double click on a certain element.

Parameters:
Name Type Description
selector

(async, static) executeVoidScript(scriptFunction, …scriptArguments)

Source:

Executes native JavaScript function.

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

(async, static) focus(selector)

Source:

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

Parameters:
Name Type Description
selector

(async, static) hover(selector)

Source:

Hovers on a certain element by mousing over the specified element.

Parameters:
Name Type Description
selector

(async, static) jsClick(selector, delay)

Source:

Clicks on element by using native JavaScript execution.

Parameters:
Name Type Default Description
selector

CSS Selector or Protractor Element

delay 1000

Delays on specified time before proceeding further.

(async, 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

(async, static) mousemove(selector)

Source:

Hovers on a certain element by mousing move to an element

Parameters:
Name Type Description
selector

(async, static) sendKeys(keys, selector)

Source:

Sends any provided keys for a certain element.

Parameters:
Name Type Description
keys
selector

(async, static) shiftClick(selector)

Source:

Performs Shift click on a certain element.

Parameters:
Name Type Description
selector

(async, static) switchToDefaultContent()

Source:

Switches back to default content. For example when you selected the frame and need to get out from it.

(async, static) switchToFrame(selector)

Source:

Switches to the specified frame.

Parameters:
Name Type Description
selector

(async, static) typeText(selector, text, sleep,)

Source:

Types a text into a specified element.

Parameters:
Name Type Description
selector
text
sleep,

sleep time (ms) between typing the characters