Dalek.DriverNative.Commands.Element Class
Element related methods
Item Index
Methods
- _attributeCb
- _clickCb
- _cssCb
- _enabledCb
- _existsCb
- _getNumberOfElementsCb
- _getNumberOfElementsCb
- _heightCb
- _scrollCb
- _selectedCb
- _sendKeysCb
- _setValueCb
- _submitCb
- _textCb
- _typeCb
- _valCb
- _visibleCb
- _waitForElementCb
- _widthCb
- attribute
- click
- click
- css
- enabled
- exists
- getNumberOfElements
- getNumberOfVisibleElements
- height
- scroll
- selected
- sendKeys
- setValue
- submit
- text
- val
- visible
- waitForElement
- width
Methods
_attributeCb
-
selector -
hash -
attribute -
expected -
result
Sends out an event with the results of the attribute call
Parameters:
-
selectorStringSelector expression to find the element
-
hashStringUnique hash of that fn call
-
attributeStringThe attribute that should be checked
-
expectedStringThe expected attribute content
-
resultStringSerialized JSON with the results of the attribute call
Returns:
promise Attribute promise
_clickCb
-
selector -
hash -
uuid
Sends out an event with the results of the click call
Parameters:
-
selectorStringSelector expression to find the element
-
hashStringUnique hash of that fn call
-
uuidStringUnique hash of that fn call
Returns:
promise Click promise
_cssCb
-
selector -
property -
expected -
hash -
result
Sends out an event with the results of the css call
Parameters:
-
selectorStringSelector expression to find the element
-
propertyStringThe css property to check
-
expectedStringThe expected css value
-
hashStringUnique hash of that fn call
-
resultStringSerialized JSON with the reuslts of the text call
Returns:
Promise
_enabledCb
-
selector -
hash -
expected -
result
Sends out an event with the results of the enabled call
Parameters:
-
selectorStringSelector expression to find the element
-
hashStringUnique hash of that fn call
-
expectedStringThe expected content
-
resultStringSerialized JSON with the results of the selected call
Returns:
Promise
_existsCb
-
selector -
hash -
result
Sends out an event with the results of the exists call
Parameters:
-
selectorStringSelector expression to find the element
-
hashStringUnique hash of that fn call
-
resultStringSerialized JSON with the reuslts of the exists call
Returns:
promise Exists promise
_getNumberOfElementsCb
-
selector -
hash -
expected -
res
Sends out an event with the results of the getNumberOfVisibleElements call
Parameters:
-
selectorStringSelector expression to find the element
-
hashStringUnique hash of that fn call
-
expectedIntegerExpected number of matched elements
-
resStringSerialized JSON with the results of the getNumberOfVisibleElements call
Returns:
promise GetNumberOfElements promise
_getNumberOfElementsCb
-
selector -
hash -
expected -
res
Sends out an event with the results of the getNumberOfElements call
Parameters:
-
selectorStringSelector expression to find the element
-
hashStringUnique hash of that fn call
-
expectedIntegerExpected number of matched elements
-
resStringSerialized JSON with the results of the getNumberOfElements call
Returns:
promise GetNumberOfElements promise
_heightCb
-
selector -
expected -
hash -
result
Sends out an event with the results of the height call
Parameters:
-
selectorStringSelector expression to find the element
-
expectedStringThe expected height value
-
hashStringUnique hash of that fn call
-
resultStringSerialized JSON with the reuslts of the text call
Returns:
Promise
_scrollCb
-
selector -
options -
hash -
uuid
Sends out an event with the results of the scroll call
Parameters:
-
selectorStringSelector expression to find the element
-
optionsObjectX offset, Y offset, Speed
-
hashStringUnique hash of that fn call
-
uuidStringUnique hash of that fn call
Returns:
promise Scroll promise
_selectedCb
-
selector -
hash -
expected -
result
Sends out an event with the results of the selected call
Parameters:
-
selectorStringSelector expression to find the element
-
hashStringUnique hash of that fn call
-
expectedStringThe expected content
-
resultStringSerialized JSON with the results of the selected call
Returns:
Promise
_sendKeysCb
-
selector -
hash
Sends out an event with the results of the sendKeys call
Parameters:
-
selectorStringSelector expression to find the element
-
hashStringUnique hash of that fn call
Returns:
promise Type promise
_setValueCb
-
selector -
keystrokes -
hash
Sends out an event with the results of the setvalue call
Parameters:
-
selectorStringSelector expression to find the element
-
keystrokesStringValue to set
-
hashStringUnique hash of that fn call
Returns:
promise Type promise
_submitCb
-
selector -
hash -
uuid
Sends out an event with the results of the submit call
Parameters:
-
selectorStringSelector expression to find the element
-
hashStringUnique hash of that fn call
-
uuidStringUnique hash of that fn call
Returns:
promise Click promise
_textCb
-
selector -
hash -
expected -
result
Sends out an event with the results of the text call
Parameters:
-
selectorStringSelector expression to find the element
-
hashStringUnique hash of that fn call
-
expectedStringThe expected text content
-
resultStringSerialized JSON with the reuslts of the text call
Returns:
Promise
_typeCb
-
selector -
hash
Sends out an event with the results of the type call
Parameters:
-
selectorStringSelector expression to find the element
-
hashStringUnique hash of that fn call
Returns:
promise Type promise
_valCb
-
selector -
hash -
expected -
result
Sends out an event with the results of the val call
Parameters:
-
selectorStringSelector expression to find the element
-
hashStringUnique hash of that fn call
-
expectedStringThe expected content
-
resultStringSerialized JSON with the results of the val call
Returns:
Promise
_visibleCb
-
selector -
hash -
result
Sends out an event with the results of the visible call
Parameters:
-
selectorStringSelector expression to find the element
-
hashStringUnique hash of that fn call
-
resultStringSerialized JSON with the reuslts of the visible call
Returns:
promise Visible promise
_waitForElementCb
-
selector -
hash -
uuid
Sends out an event with the results of the waitForElement call
Parameters:
-
selectorStringSelector expression to find the element
-
hashStringUnique hash of that fn call
-
uuidStringUnique hash of that fn call
Returns:
promise WaitForElement promise
_widthCb
-
selector -
expected -
hash -
result
Sends out an event with the results of the width call
Parameters:
-
selectorStringSelector expression to find the element
-
expectedStringThe expected width value
-
hashStringUnique hash of that fn call
-
resultStringSerialized JSON with the reuslts of the text call
Returns:
Promise
attribute
-
selector -
attribute -
expected -
hash
Checks if an element has an attribute with the expected value
Parameters:
-
selectorStringSelector expression to find the element
-
attributeStringThe attribute that should be checked
-
expectedStringThe expected text content
-
hashStringUnique hash of that fn call
click
-
selector -
hash
Clicks an element
Parameters:
-
selectorStringSelector expression to find the element
-
hashStringUnique hash of that fn call
click
-
selector -
hash -
uuid
Clicks an element
Parameters:
-
selectorStringSelector expression to find the element
-
hashStringUnique hash of that fn call
-
uuidStringUnique hash of that fn call
css
-
selector -
property -
expected -
hash
Checks if an element has the expected css property/value pairs
Parameters:
-
selectorStringSelector expression to find the element
-
propertyStringThe css property to check
-
expectedStringThe expected css value
-
hashStringUnique hash of that fn call
enabled
-
selector -
expected -
hash
Checks if an element is enabled
Parameters:
-
selectorStringSelector expression to find the element
-
expectedStringThe expected content
-
hashStringUnique hash of that fn call
exists
-
selector -
hash
Checks if an element exists
Parameters:
-
selectorStringSelector expression to find the element
-
hashStringUnique hash of that fn call
getNumberOfElements
-
selector -
expected -
uuid
Returns the number of elements matched by the selector
Parameters:
-
selectorStringSelector expression to find the elements
-
expectedIntegerExpected number of matched elements
-
uuidStringUnique hash of that fn call
getNumberOfVisibleElements
-
selector -
expected -
uuid
Returns the number of visible elements matched by the selector
Parameters:
-
selectorStringSelector expression to find the elements
-
expectedIntegerExpected number of matched elements
-
uuidStringUnique hash of that fn call
height
-
selector -
expected -
hash
Checks th height of an element
Parameters:
-
selectorStringSelector expression to find the element
-
expectedStringThe expected height value
-
hashStringUnique hash of that fn call
scroll
-
selector -
options -
hash -
uuid
Scrolls from an element to a location defined in pixels
Parameters:
-
selectorStringSelector expression to find the element
-
optionsObjectX offset, Y offset, Speed
-
hashStringUnique hash of that fn call
-
uuidStringUnique hash of that fn call
selected
-
selector -
expected -
hash
Checks if an element is selected
Parameters:
-
selectorStringSelector expression to find the element
-
expectedStringThe expected content
-
hashStringUnique hash of that fn call
sendKeys
-
selector -
hash
Sends keys to an element (whether or not it is an input)
Parameters:
-
selectorStringSelector expression to find the element
-
hashStringUnique hash of that fn call
setValue
-
selector -
hash
Set a value to an Element
Parameters:
-
selectorStringSelector expression to find the element
-
hashStringUnique hash of that fn call
submit
-
selector -
hash -
uuid
Submits a form
Parameters:
-
selectorStringSelector expression to find the element
-
hashStringUnique hash of that fn call
-
uuidStringUnique hash of that fn call
text
-
selector -
expected -
hash
Checks if an element has the expected text
Parameters:
-
selectorStringSelector expression to find the element
-
expectedStringThe expected text content
-
hashStringUnique hash of that fn call
val
-
selector -
expected -
hash
Checks if an element has the expected value
Parameters:
-
selectorStringSelector expression to find the element
-
expectedStringThe expected content
-
hashStringUnique hash of that fn call
visible
-
selector -
hash
Checks if an element is visible
Parameters:
-
selectorStringSelector expression to find the element
-
hashStringUnique hash of that fn call
waitForElement
-
selector -
timeout -
hash -
uuid
Wait for an element for a specific amount of time
Parameters:
-
selectorStringSelector expression to find the element
-
timeoutIntegerTime to wait in ms
-
hashStringUnique hash of that fn call
-
uuidStringUnique hash of that fn call
width
-
selector -
expected -
hash
Checks th width of an element
Parameters:
-
selectorStringSelector expression to find the element
-
expectedStringThe expected width value
-
hashStringUnique hash of that fn call
