API Docs for: 0.9.1
Show:

PanelObject Class

Extends ViewObject
Defined in: lib/panelObject.js:6

Methods

_getPanelRootElement

(
  • context
  • [timeOut]
  • [waitInMs]
)
Element private

Gets the root element of the panel-object

Parameters:

  • context Element
  • [timeOut] Int optional
  • [waitInMs] Int optional

Returns:

Element:

addLoadSelector

(
  • selector
)
BaseObject

Adds a single load selector, elements that should be selected when object is loaded

Parameters:

Returns:

addLoadSelectors

(
  • selectors
)
BaseObject

Adds multiple load selectors, elements that should be selected when object is loaded

Parameters:

Returns:

blackOut

() Object[]

List of blackout coordinates for the current page-object

Returns:

capture

(
  • title
  • [id='1']
  • [wait=1000]
  • [additionalBlackOuts]
)
Promise

Captures the current page-object

Parameters:

  • title String

    Title of test or part of identifier

  • [id='1'] String optional

    Identifier for screenshot file

  • [wait=1000] Int optional

    Wait before a screenshot is taken

  • [additionalBlackOuts] Object[] optional

    Additional black-outs

Returns:

Promise:

getAdapter

() DriverAdapter

Gets the web-driver adapter

Returns:

getContext

() Element

Get the page-object context

Returns:

Element:

getElement

(
  • selectorName
)
Element

Gets an element by a selector name

Parameters:

Returns:

Element:

getFrame

(
  • [selectorName]
)
Object

Get the coordinates and size of an element

Parameters:

  • [selectorName] String optional

    Defaults to current context

Returns:

Object:

{x: int, y: int, width: int, height: int}

getSelector

(
  • selectorName
)
String

Gets a specific selector by name

Parameters:

Returns:

getSelectors

() Object

Get a list of all selectors

Returns:

hasElement

(
  • selectorName
)
Boolean

Checks if a selector name does exist in the selector list

Parameters:

Returns:

hasSelector

(
  • selectorName
)
Boolean

Does it have a specific selector by name

Parameters:

Returns:

initialize

()

Initializes the base-object

setSelectors

(
  • selectors
)

Sets the selectors

Parameters:

verifyIsLoaded

(
  • [timeOut]
  • [waitInMs]
)
BaseObject

Verifies that the page-object and its sub-dom-elements are loaded as expected

Parameters:

  • [timeOut] Int optional
  • [waitInMs] Int optional

Returns:

waitForElements

(
  • selectors
  • [timeOut=10000]
  • [waitInMs=500]
)
BaseObject

Waits for the element to appear on the page

Parameters:

  • selectors String[]
  • [timeOut=10000] Int optional
  • [waitInMs=500] Int optional

Returns:

waitUntil

(
  • fn
  • [timeOut=10000]
  • [waitInMs=500]
)
BaseObject

Wait until a callback returns a truthy value

Parameters:

  • fn Function
  • [timeOut=10000] Int optional
  • [waitInMs=500] Int optional

Returns:

Properties

SELECTOR

String static

Selector for panel object

TYPE

String static