BaseObject Class
Methods
addLoadSelector
(
BaseObject
-
selector
Adds a single load selector, elements that should be selected when object is loaded
Parameters:
-
selectorString
Returns:
addLoadSelectors
(
BaseObject
-
selectors
Adds multiple load selectors, elements that should be selected when object is loaded
Parameters:
-
selectorsString[]
Returns:
capture
(
Promise
-
title -
[id='1'] -
[wait=1000] -
[additionalBlackOuts]
Captures the current page-object
Parameters:
Returns:
Promise:
getContext
()
Element
Get the page-object context
Returns:
Element:
getElement
(
Element
-
selectorName
Gets an element by a selector name
Parameters:
-
selectorNameString
Returns:
Element:
getFrame
(
Object
-
[selectorName]
Get the coordinates and size of an element
Parameters:
-
[selectorName]String optionalDefaults to current context
Returns:
Object:
{x: int, y: int, width: int, height: int}
getSelector
(
String
-
selectorName
Gets a specific selector by name
Parameters:
-
selectorNameString
Returns:
hasElement
(
Boolean
-
selectorName
Checks if a selector name does exist in the selector list
Parameters:
-
selectorNameString
Returns:
hasSelector
(
Boolean
-
selectorName
Does it have a specific selector by name
Parameters:
-
selectorNameString
Returns:
initialize
()
Initializes the base-object
verifyIsLoaded
(
BaseObject
-
[timeOut] -
[waitInMs]
Verifies that the page-object and its sub-dom-elements are loaded as expected
Parameters:
-
[timeOut]Int optional -
[waitInMs]Int optional
Returns:
waitForElements
(
BaseObject
-
selectors -
[timeOut=10000] -
[waitInMs=500]
Waits for the element to appear on the page
Parameters:
-
selectorsString[] -
[timeOut=10000]Int optional -
[waitInMs=500]Int optional
Returns:
waitUntil
(
BaseObject
-
fn -
[timeOut=10000] -
[waitInMs=500]
Wait until a callback returns a truthy value
Parameters:
-
fnFunction -
[timeOut=10000]Int optional -
[waitInMs=500]Int optional
