# Class OjNBox

The component WebElement for oj-n-box. Do not instantiate this class directly, instead, use ojNBox.

#### Hierarchy

- OjNBoxBase
  - OjNBox

#####
Index

### Constructors

constructor

### Methods

changeHiddenCategories
changeHighlightedCategories
changeMaximizedColumn
changeMaximizedRow
changeSelection
clear
click
findElement
findElements
getAnimationOnDataChange
getAnimationOnDisplay
getAs
getAttribute
getCellContent
getCellMaximize
getCells
getColumns
getColumnsTitle
getCountLabel
getCssValue
getDriver
getGroupAttributes
getGroupBehavior
getHiddenCategories
getHighlightMatch
getHighlightedCategories
getHoverBehavior
getId
getLabelTruncation
getLocation
getMaximizedColumn
getMaximizedRow
getNodes
getOtherColor
getOtherThreshold
getProperty
getRect
getRows
getRowsTitle
getSelection
getSelectionMode
getShadowRoot
getSize
getStyleDefaults
getTagName
getText
getTooltip
getTouchResponse
getTrackResize
getTranslations
hasSize
hasVisibility
isDisplayed
isEnabled
isSelected
sendKeys
serialize
setProperty
submit
takeScreenshot
whenBusyContextReady
whenReady
buildId
equals
extractId
isId

## Constructors

### constructor

- new OjNBox(el, locators): OjNBox

- Constructor. Pass an instance of WebDriver's WebElement that represents the DOM node on which we"ll perform operations.

  #### Parameters

  - ##### el: WebElement

    The basic WebElement with which this WebElement will work.

  - ##### locators: ElementLocators

  #### Returns OjNBox

  Inherited from OjNBoxBase.constructor

## Methods

### changeHiddenCategories

- changeHiddenCategories(hiddenCategories): Promise<void>

- Sets the value of `hiddenCategories` property. An array of category strings used for filtering. Data items with any category matching an item in this array will be filtered.

  #### Parameters

  - ##### hiddenCategories: string[]

    The value to set for `hiddenCategories`

  #### Returns Promise<void>

  Inherited from OjNBoxBase.changeHiddenCategories

### changeHighlightedCategories

- changeHighlightedCategories(highlightedCategories): Promise<void>

- Sets the value of `highlightedCategories` property. An array of category strings used for highlighting. Data items matching categories in this array will be highlighted.

  #### Parameters

  - ##### highlightedCategories: string[]

    The value to set for `highlightedCategories`

  #### Returns Promise<void>

  Inherited from OjNBoxBase.changeHighlightedCategories

### changeMaximizedColumn

- changeMaximizedColumn(maximizedColumn): Promise<void>

- Sets the value of `maximizedColumn` property. The id of the column to be maximized.

  #### Parameters

  - ##### maximizedColumn: string

    The value to set for `maximizedColumn`

  #### Returns Promise<void>

  Inherited from OjNBoxBase.changeMaximizedColumn

### changeMaximizedRow

- changeMaximizedRow(maximizedRow): Promise<void>

- Sets the value of `maximizedRow` property. The id of the row to be maximized.

  #### Parameters

  - ##### maximizedRow: string

    The value to set for `maximizedRow`

  #### Returns Promise<void>

  Inherited from OjNBoxBase.changeMaximizedRow

### changeSelection

- changeSelection(selection): Promise<void>

- Sets the value of `selection` property. Specifies the ids of the selected nodes.

  #### Parameters

  - ##### selection: any[]

    The value to set for `selection`

  #### Returns Promise<void>

  Inherited from OjNBoxBase.changeSelection

### clear

- clear(): Promise<void>

- ### Inherit Doc

  #### Returns Promise<void>

  Inherited from OjNBoxBase.clear

### click

- click(): Promise<void>

- ### Inherit Doc

  #### Returns Promise<void>

  Inherited from OjNBoxBase.click

### findElement

- findElement(locator): WebElementPromise

- ### Inherit Doc

  #### Parameters

  - ##### locator: Locator

  #### Returns WebElementPromise

  Inherited from OjNBoxBase.findElement

### findElements

- findElements(locator): Promise<WebElement[]>

- ### Inherit Doc

  #### Parameters

  - ##### locator: Locator

  #### Returns Promise<WebElement[]>

  Inherited from OjNBoxBase.findElements

### getAnimationOnDataChange

- getAnimationOnDataChange(): Promise<string>

- Gets the value of `animationOnDataChange` property. Specifies the animation that is applied on data changes.

  #### Returns Promise<string>

  The value of `animationOnDataChange` property.

  Inherited from OjNBoxBase.getAnimationOnDataChange

### getAnimationOnDisplay

- getAnimationOnDisplay(): Promise<string>

- Gets the value of `animationOnDisplay` property. Specifies the animation that is shown on initial display.

  #### Returns Promise<string>

  The value of `animationOnDisplay` property.

  Inherited from OjNBoxBase.getAnimationOnDisplay

### getAs

- getAs(): Promise<string>

- Gets the value of `as` property. Specifies the alias for the current item when referenced inside the nodeTemplate.

  ### Deprecated

  Since 6.2.0. Set the alias directly on the template element using the data-oj-as attribute instead.

  #### Returns Promise<string>

  The value of `as` property.

  Inherited from OjNBoxBase.getAs

### getAttribute

- getAttribute(attributeName): Promise<string>

- ### Inherit Doc

  #### Parameters

  - ##### attributeName: string

  #### Returns Promise<string>

  Inherited from OjNBoxBase.getAttribute

### getCellContent

- getCellContent(): Promise<string>

- Gets the value of `cellContent` property. Specifies the content displayed in cells. See the Help documentation for more information.

  #### Returns Promise<string>

  The value of `cellContent` property.

  Inherited from OjNBoxBase.getCellContent

### getCellMaximize

- getCellMaximize(): Promise<string>

- Gets the value of `cellMaximize` property. Specifies whether cell maximize/de-maximize gestures are enabled.

  #### Returns Promise<string>

  The value of `cellMaximize` property.

  Inherited from OjNBoxBase.getCellMaximize

### getCells

- getCells(): Promise<Cells[]>

- Gets the value of `cells` property. Specifies the list of cells. Also accepts a Promise for deferred data rendering.

  #### Returns Promise<Cells[]>

  The value of `cells` property.

  Inherited from OjNBoxBase.getCells

### getColumns

- getColumns(): Promise<Columns[]>

- Gets the value of `columns` property. Specifies the list of columns. Also accepts a Promise for deferred data rendering.

  #### Returns Promise<Columns[]>

  The value of `columns` property.

  Inherited from OjNBoxBase.getColumns

### getColumnsTitle

- getColumnsTitle(): Promise<string>

- Gets the value of `columnsTitle` property. The text for the title on the column edge.

  #### Returns Promise<string>

  The value of `columnsTitle` property.

  Inherited from OjNBoxBase.getColumnsTitle

### getCountLabel

- getCountLabel(): Promise<null>

- Gets the value of `countLabel` property. A function that returns custom text for the cell count labels.

  #### Returns Promise<null>

  The value of `countLabel` property.

  Inherited from OjNBoxBase.getCountLabel

### getCssValue

- getCssValue(cssStyleProperty): Promise<string>

- ### Inherit Doc

  #### Parameters

  - ##### cssStyleProperty: string

  #### Returns Promise<string>

  Inherited from OjNBoxBase.getCssValue

### getDriver

- getDriver(): WebDriver

- #### Returns WebDriver

  The parent driver for this instance.

  Inherited from OjNBoxBase.getDriver

### getGroupAttributes

- getGroupAttributes(): Promise<string[]>

- Gets the value of `groupAttributes` property. An array of attributes for styling the group nodes.

  #### Returns Promise<string[]>

  The value of `groupAttributes` property.

  Inherited from OjNBoxBase.getGroupAttributes

### getGroupBehavior

- getGroupBehavior(): Promise<string>

- Gets the value of `groupBehavior` property. Specifies how nodes should be grouped.

  #### Returns Promise<string>

  The value of `groupBehavior` property.

  Inherited from OjNBoxBase.getGroupBehavior

### getHiddenCategories

- getHiddenCategories(): Promise<string[]>

- Gets the value of `hiddenCategories` property. An array of category strings used for filtering. Data items with any category matching an item in this array will be filtered.

  #### Returns Promise<string[]>

  The value of `hiddenCategories` property.

  Inherited from OjNBoxBase.getHiddenCategories

### getHighlightMatch

- getHighlightMatch(): Promise<string>

- Gets the value of `highlightMatch` property. The matching condition for the highlightedCategories property. See the Help documentation for more information.

  #### Returns Promise<string>

  The value of `highlightMatch` property.

  Inherited from OjNBoxBase.getHighlightMatch

### getHighlightedCategories

- getHighlightedCategories(): Promise<string[]>

- Gets the value of `highlightedCategories` property. An array of category strings used for highlighting. Data items matching categories in this array will be highlighted.

  #### Returns Promise<string[]>

  The value of `highlightedCategories` property.

  Inherited from OjNBoxBase.getHighlightedCategories

### getHoverBehavior

- getHoverBehavior(): Promise<string>

- Gets the value of `hoverBehavior` property. Defines the behavior applied when hovering over data items.

  #### Returns Promise<string>

  The value of `hoverBehavior` property.

  Inherited from OjNBoxBase.getHoverBehavior

### getId

- getId(): Promise<string>

- #### Returns Promise<string>

  A promise that resolves to the server-assigned opaque ID assigned to this element.

  Inherited from OjNBoxBase.getId

### getLabelTruncation

- getLabelTruncation(): Promise<string>

- Gets the value of `labelTruncation` property. Specifies node label truncation behavior. See the Help documentation for more information.

  #### Returns Promise<string>

  The value of `labelTruncation` property.

  Inherited from OjNBoxBase.getLabelTruncation

### getLocation

- getLocation(): Promise<ILocation>

- ### Inherit Doc

  #### Returns Promise<ILocation>

  Inherited from OjNBoxBase.getLocation

### getMaximizedColumn

- getMaximizedColumn(): Promise<string>

- Gets the value of `maximizedColumn` property. The id of the column to be maximized.

  #### Returns Promise<string>

  The value of `maximizedColumn` property.

  Inherited from OjNBoxBase.getMaximizedColumn

### getMaximizedRow

- getMaximizedRow(): Promise<string>

- Gets the value of `maximizedRow` property. The id of the row to be maximized.

  #### Returns Promise<string>

  The value of `maximizedRow` property.

  Inherited from OjNBoxBase.getMaximizedRow

### getNodes

- getNodes(): Promise<Nodes[]>

- Gets the value of `nodes` property. The list of nodes. Also accepts a Promise for deferred data rendering.

  #### Returns Promise<Nodes[]>

  The value of `nodes` property.

  Inherited from OjNBoxBase.getNodes

### getOtherColor

- getOtherColor(): Promise<string>

- Gets the value of `otherColor` property. The color for the "other" group nodes. See the Help documentation for more information.

  #### Returns Promise<string>

  The value of `otherColor` property.

  Inherited from OjNBoxBase.getOtherColor

### getOtherThreshold

- getOtherThreshold(): Promise<number>

- Gets the value of `otherThreshold` property. The threshold for aggregating nodes into an "other" group node. See the Help documentation for more information.

  #### Returns Promise<number>

  The value of `otherThreshold` property.

  Inherited from OjNBoxBase.getOtherThreshold

### getProperty

- getProperty<T>(propertyName): Promise<T>

- Get a named property value from this component. This function will wait for the application's busy context to complete before attempting to get the property value.

  #### Type Parameters

  - #### T = string

  #### Parameters

  - ##### propertyName: string

    The name of the property

  #### Returns Promise<T>

  A Promise that yields a value for the named property.

  Inherited from OjNBoxBase.getProperty

### getRect

- getRect(): Promise<IRectangle>

- ### Inherit Doc

  #### Returns Promise<IRectangle>

  Inherited from OjNBoxBase.getRect

### getRows

- getRows(): Promise<Rows[]>

- Gets the value of `rows` property. The list of rows. Also accepts a Promise for deferred data rendering.

  #### Returns Promise<Rows[]>

  The value of `rows` property.

  Inherited from OjNBoxBase.getRows

### getRowsTitle

- getRowsTitle(): Promise<string>

- Gets the value of `rowsTitle` property. The text for the title on the row edge.

  #### Returns Promise<string>

  The value of `rowsTitle` property.

  Inherited from OjNBoxBase.getRowsTitle

### getSelection

- getSelection(): Promise<any[]>

- Gets the value of `selection` property. Specifies the ids of the selected nodes.

  #### Returns Promise<any[]>

  The value of `selection` property.

  Inherited from OjNBoxBase.getSelection

### getSelectionMode

- getSelectionMode(): Promise<string>

- Gets the value of `selectionMode` property. Specifies the selection behavior on the NBox. See the Help documentation for more information.

  #### Returns Promise<string>

  The value of `selectionMode` property.

  Inherited from OjNBoxBase.getSelectionMode

### getShadowRoot

- getShadowRoot(): ShadowRootPromise

- Get the shadow root of the current web element.

  #### Returns ShadowRootPromise

  A promise that will be resolved with the elements shadow root or rejected with NoSuchShadowRootError

  Inherited from OjNBoxBase.getShadowRoot

### getSize

- getSize(): Promise<ISize>

- ### Inherit Doc

  #### Returns Promise<ISize>

  Inherited from OjNBoxBase.getSize

### getStyleDefaults

- getStyleDefaults(): Promise<StyleDefaults>

- Gets the value of `styleDefaults` property. An object defining the style defaults for this NBox.

  #### Returns Promise<StyleDefaults>

  The value of `styleDefaults` property.

  Inherited from OjNBoxBase.getStyleDefaults

### getTagName

- getTagName(): Promise<string>

- Schedules a command to query for the tag/node name of this element.

  #### Returns Promise<string>

  A promise that will be resolved with the element's tag name.

  Inherited from OjNBoxBase.getTagName

### getText

- getText(): Promise<string>

- ### Inherit Doc

  #### Returns Promise<string>

  Inherited from OjNBoxBase.getText

### getTooltip

- getTooltip(): Promise<Tooltip>

- Gets the value of `tooltip` property. An object containing an optional callback function for tooltip customization.

  #### Returns Promise<Tooltip>

  The value of `tooltip` property.

  Inherited from OjNBoxBase.getTooltip

### getTouchResponse

- getTouchResponse(): Promise<string>

- Gets the value of `touchResponse` property. Specifies configuration options for touch and hold delays on mobile devices. See the Help documentation for more information.

  #### Returns Promise<string>

  The value of `touchResponse` property.

  Inherited from OjNBoxBase.getTouchResponse

### getTrackResize

- getTrackResize(): Promise<string>

- Gets the value of `trackResize` property. Defines whether the element will automatically render in response to changes in size. See the Help documentation for more information.

  #### Returns Promise<string>

  The value of `trackResize` property.

  Inherited from OjNBoxBase.getTrackResize

### getTranslations

- getTranslations(): Promise<Translations>

- Gets the value of `translations` property. A collection of translated resources from the translation bundle, or null if this component has no resources.

  #### Returns Promise<Translations>

  The value of `translations` property.

  Inherited from OjNBoxBase.getTranslations

### `Protected` hasSize

- hasSize(): Condition<Promise<boolean>>

- Create a wait condition that is satisfied when the element's DOM has a non-zero size.

  ### Deprecated

  Since 11.0.0. Call the appropriate WebElement method to test the size of the element.

  #### Returns Condition<Promise<boolean>>

  The Condition to be used with driver.wait() that's satisfied when the element's DOM has a non-zero size.

  Inherited from OjNBoxBase.hasSize

### `Protected` hasVisibility

- hasVisibility(): Condition<Promise<boolean>>

- Create a wait condition that is satisfid when the element is visible. The condition is satisfied when the element is displayed, as reported by #isDisplayed, and is scrolled into view. This is method is deprecated. Use WebElement.isDisplayed instead to test the display of the element, and scroll it into view if necessary.

  ### Deprecated

  #### Returns Condition<Promise<boolean>>

  Inherited from OjNBoxBase.hasVisibility

### isDisplayed

- isDisplayed(): Promise<boolean>

- ### Inherit Doc

  #### Returns Promise<boolean>

  Inherited from OjNBoxBase.isDisplayed

### isEnabled

- isEnabled(): Promise<boolean>

- ### Inherit Doc

  #### Returns Promise<boolean>

  Inherited from OjNBoxBase.isEnabled

### isSelected

- isSelected(): Promise<boolean>

- ### Inherit Doc

  #### Returns Promise<boolean>

  Inherited from OjNBoxBase.isSelected

### sendKeys

- sendKeys(...varArgs): Promise<void>

- ### Inherit Doc

  #### Parameters

  - ##### `Rest` ...varArgs: (string | number | Promise<string | number>)[]

  #### Returns Promise<void>

  Inherited from OjNBoxBase.sendKeys

### serialize

- serialize(): Promise<IWebElementId>

- #### Returns Promise<IWebElementId>

  Inherited from OjNBoxBase.serialize

### `Protected` setProperty

- setProperty<T>(propertyName, value): Promise<void>

- Set a property value on the remote element. This function first waits for the BusyContext to clear before setting the property, then after setting, waits again to ensure that no additional busy states were created due to the property setting.

  #### Type Parameters

  - #### T = string

  #### Parameters

  - ##### propertyName: string

    The property name to set

  - ##### value: T

    The value to set for the property

  #### Returns Promise<void>

  A Promise which resolves when the remote property has been set to the value. Any value returned from the call to set the remote property is returned in the Promise.

  Inherited from OjNBoxBase.setProperty

### submit

- submit(): Promise<void>

- ### Inherit Doc

  #### Returns Promise<void>

  Inherited from OjNBoxBase.submit

### takeScreenshot

- takeScreenshot(optScroll?): Promise<string>

- ### Inherit Doc

  #### Parameters

  - ##### `Optional` optScroll: boolean

  #### Returns Promise<string>

  Inherited from OjNBoxBase.takeScreenshot

### whenBusyContextReady

- whenBusyContextReady(): Promise<void>

- Returns a Promise that is resolved when the application's busy state reports ready. This method checks only that the application's busy context is ready, and not that the DOM element is actually displayed or has a physical size, such as is the case with #whenReady. Operations which are read-only in nature should call this method prior to execution.

  #### Returns Promise<void>

  A Promise which is resolved when the page's busy state is ready.

  Inherited from OjNBoxBase.whenBusyContextReady

### whenReady

- whenReady(): Promise<void>

- Returns a Promise that is resolved when the element is ready for interaction--it is visible, has a size, and the app's busy context is ready. Operations on the DOM which rely on its physical location and size to be in a "ready" state should use this command, such as clicking, sending keys, locating child elements, and so on.

  #### Returns Promise<void>

  A Promise that's resolved when all conditions are met.

  Inherited from OjNBoxBase.whenReady

### `Static` buildId

- buildId(id, opt_noLegacy?): IWebElementId

- #### Parameters

  - ##### id: string

    The raw ID.

  - ##### `Optional` opt_noLegacy: boolean

    Whether to exclude the legacy element key.

  #### Returns IWebElementId

  The element ID for use with WebDriver's wire protocol.

  Inherited from OjNBoxBase.buildId

### `Static` equals

- equals(a, b): Promise<boolean>

- Compares two WebElements for equality.

  #### Parameters

  - ##### a: WebElement

    A WebElement.

  - ##### b: WebElement

    A WebElement.

  #### Returns Promise<boolean>

  A promise that will be resolved to whether the two WebElements are equal.

  Inherited from OjNBoxBase.equals

### `Static` extractId

- extractId(obj): string

- Extracts the encoded WebElement ID from the object.

  ### Throws

  if the object is not a valid encoded ID.

  #### Parameters

  - ##### obj: IWebElementId

    The object to extract the ID from.

  #### Returns string

  the extracted ID.

  Inherited from OjNBoxBase.extractId

### `Static` isId

- isId(obj): boolean

- #### Parameters

  - ##### obj: IWebElementId

    the object to test.

  #### Returns boolean

  whether the object is a valid encoded WebElement ID.

  Inherited from OjNBoxBase.isId

Generated using TypeDoc