GenericPageObject Class
Methods
_getPanelRootElement
(
Element
private
-
context
-
[timeOut]
-
[waitInMs]
Gets the root element of the panel-object
Parameters:
-
context
Element -
[timeOut]
Int optional -
[waitInMs]
Int optional
Returns:
Element:
addLoadSelector
(
BaseObject
-
selector
Adds a single load selector, elements that should be selected when object is loaded
Parameters:
-
selector
String
Returns:
addLoadSelectors
(
BaseObject
-
selectors
Adds multiple load selectors, elements that should be selected when object is loaded
Parameters:
-
selectors
String[]
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:
-
selectorName
String
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:
-
selectorName
String
Returns:
hasElement
(
Boolean
-
selectorName
Checks if a selector name does exist in the selector list
Parameters:
-
selectorName
String
Returns:
hasSelector
(
Boolean
-
selectorName
Does it have a specific selector by name
Parameters:
-
selectorName
String
Returns:
initialize
()
Initializes the base-object
verifyIsLoaded
(
GenericPageObject
private
-
[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:
-
selectors
String[] -
[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:
-
fn
Function -
[timeOut=10000]
Int optional -
[waitInMs=500]
Int optional