Members
typeNewText
Cleans previously typed text and fill in with a new value.
Methods
(async, static) bulkCtrlKey(selectors)
Performs a bulk of Ctrl clicks.
Parameters:
Name | Type | Description |
---|---|---|
selectors |
(async, static) bulkShiftKey(selectors)
Performs a bulk of Shift clicks.
Parameters:
Name | Type | Description |
---|---|---|
selectors |
(async, static) clearText(selector)
Clear text in found element.
Parameters:
Name | Type | Description |
---|---|---|
selector |
(async, static) click(selector, delay)
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()
Performs an enter on a certain element.
(async, static) clickIfClickable(selector, delay)
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)
Performs Ctrl click on a certain element.
Parameters:
Name | Type | Description |
---|---|---|
selector |
(async, static) doubleClick(selector)
Performs double click on a certain element.
Parameters:
Name | Type | Description |
---|---|---|
selector |
(async, static) executeVoidScript(scriptFunction, …scriptArguments)
Executes native JavaScript function.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
scriptFunction |
function | ||
scriptArguments |
array |
<repeatable> |
(async, static) focus(selector)
Focuses on a certain element. Mainly has to be used for input fields.
Parameters:
Name | Type | Description |
---|---|---|
selector |
(async, static) hover(selector)
Hovers on a certain element by mousing over the specified element.
Parameters:
Name | Type | Description |
---|---|---|
selector |
(async, static) jsClick(selector, delay)
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)
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)
Hovers on a certain element by mousing move to an element
Parameters:
Name | Type | Description |
---|---|---|
selector |
(async, static) sendKeys(keys, selector)
Sends any provided keys for a certain element.
Parameters:
Name | Type | Description |
---|---|---|
keys |
||
selector |
(async, static) shiftClick(selector)
Performs Shift click on a certain element.
Parameters:
Name | Type | Description |
---|---|---|
selector |
(async, static) switchToDefaultContent()
Switches back to default content. For example when you selected the frame and need to get out from it.
(async, static) switchToFrame(selector)
Switches to the specified frame.
Parameters:
Name | Type | Description |
---|---|---|
selector |
(async, static) typeText(selector, text, sleep,)
Types a text into a specified element.
Parameters:
Name | Type | Description |
---|---|---|
selector |
||
text |
||
sleep, |
sleep time (ms) between typing the characters |