@sap_oss/wdio-qmate-service
Version:
[](https://api.reuse.software/info/github.com/SAP/wdio-qmate-service)[](http
1,284 lines (1,024 loc) • 324 kB
Markdown
## Constants
<dl>
<dt><a href="#common">common</a></dt>
<dd><p>Global namespace for common modules.</p>
</dd>
<dt><a href="#util">util</a></dt>
<dd><p>Global namespace for util modules.</p>
</dd>
<dt><a href="#ui5">ui5</a></dt>
<dd><p>Global namespace for UI5 modules.</p>
</dd>
<dt><a href="#nonUi5">nonUi5</a></dt>
<dd><p>Global namespace for non UI5 modules.</p>
</dd>
<dt><a href="#service">service</a></dt>
<dd><p>Global namespace for service modules.</p>
</dd>
<dt><a href="#mobile">mobile</a></dt>
<dd><p>Global namespace for mobile modules.</p>
</dd>
<dt><a href="#flp">flp</a></dt>
<dd><p>Global namespace for Fiori Launchpad (FLP) modules.</p>
</dd>
</dl>
<a name="common"></a>
## common
Global namespace for common modules.
**Kind**: global constant
* [common](#common)
* [.assertion](#common.assertion)
* [.expectEqual(value1, value2)](#common.assertion.expectEqual)
* [.expectUnequal(value1, value2)](#common.assertion.expectUnequal)
* [.expectTrue(value)](#common.assertion.expectTrue)
* [.expectFalse(value)](#common.assertion.expectFalse)
* [.expectDefined(value)](#common.assertion.expectDefined)
* [.expectUndefined(value)](#common.assertion.expectUndefined)
* [.expectUrlToBe()](#common.assertion.expectUrlToBe)
* [.expectToContain(value1, value2)](#common.assertion.expectToContain)
* [.date](#common.date)
* [.getToday([format])](#common.date.getToday) ⇒ <code>String</code>
* [.getTomorrow([format])](#common.date.getTomorrow) ⇒ <code>String</code>
* [.getNextMonth([format])](#common.date.getNextMonth) ⇒ <code>String</code>
* [.getPreviousMonth([format])](#common.date.getPreviousMonth) ⇒ <code>String</code>
* [.getNextYear([format])](#common.date.getNextYear) ⇒ <code>String</code>
* [.getPreviousYear([format])](#common.date.getPreviousYear) ⇒ <code>String</code>
* [.getSpecific(date, [format])](#common.date.getSpecific) ⇒ <code>String</code>
* [.calculate([date], [format])](#common.date.calculate) ⇒ <code>String</code> \| <code>Date</code>
* [.getCurrentDateAndTime([format])](#common.date.getCurrentDateAndTime) ⇒ <code>String</code> \| <code>Date</code>
* [.calculateWithTime([date], [time], [format])](#common.date.calculateWithTime) ⇒ <code>String</code> \| <code>Date</code>
* [.navigation](#common.navigation)
* [.navigateToUrl(url)](#common.navigation.navigateToUrl)
* [.navigateToUrlAndRetry(url, [retries], [interval])](#common.navigation.navigateToUrlAndRetry)
* [.userInteraction](#common.userInteraction)
* [.fillActive(value)](#common.userInteraction.fillActive)
* [.fillActiveAndRetry(value, [retries], [interval])](#common.userInteraction.fillActiveAndRetry)
* [.clearAndFillActive(value)](#common.userInteraction.clearAndFillActive)
* [.clearAndFillActiveAndRetry(value, [retries], [interval])](#common.userInteraction.clearAndFillActiveAndRetry)
* [.pressKey(keys)](#common.userInteraction.pressKey)
* [.pressEnter()](#common.userInteraction.pressEnter)
* [.pressTab()](#common.userInteraction.pressTab)
* [.pressF4()](#common.userInteraction.pressF4)
* [.pressBackspace()](#common.userInteraction.pressBackspace)
* [.pressEscape()](#common.userInteraction.pressEscape)
* [.pressArrowLeft()](#common.userInteraction.pressArrowLeft)
* [.pressArrowRight()](#common.userInteraction.pressArrowRight)
<a name="common.assertion"></a>
### common.assertion
**Kind**: static class of [<code>common</code>](#common)
* [.assertion](#common.assertion)
* [.expectEqual(value1, value2)](#common.assertion.expectEqual)
* [.expectUnequal(value1, value2)](#common.assertion.expectUnequal)
* [.expectTrue(value)](#common.assertion.expectTrue)
* [.expectFalse(value)](#common.assertion.expectFalse)
* [.expectDefined(value)](#common.assertion.expectDefined)
* [.expectUndefined(value)](#common.assertion.expectUndefined)
* [.expectUrlToBe()](#common.assertion.expectUrlToBe)
* [.expectToContain(value1, value2)](#common.assertion.expectToContain)
<a name="common.assertion.expectEqual"></a>
#### assertion.expectEqual(value1, value2)
Expects the passed values to be equal.
**Kind**: static method of [<code>assertion</code>](#common.assertion)
| Param | Type | Description |
| --- | --- | --- |
| value1 | <code>Any</code> | Value (1) to be equal to value (2) |
| value2 | <code>Any</code> | Value (2) to be equal to value (1) |
**Example**
```js
common.assertion.expectEqual(value1, value2);
```
<a name="common.assertion.expectUnequal"></a>
#### assertion.expectUnequal(value1, value2)
Expects the passed values to be unequal.
**Kind**: static method of [<code>assertion</code>](#common.assertion)
| Param | Type | Description |
| --- | --- | --- |
| value1 | <code>Any</code> | Value (1) to be unequal to value (2) |
| value2 | <code>Any</code> | Value (2) to be unequal to value (1) |
**Example**
```js
common.assertion.expectUnequal(value1, value2);
```
<a name="common.assertion.expectTrue"></a>
#### assertion.expectTrue(value)
Expects the passed value to be true.
**Kind**: static method of [<code>assertion</code>](#common.assertion)
| Param | Type | Description |
| --- | --- | --- |
| value | <code>Any</code> | Value to be equal to true |
**Example**
```js
common.assertion.expectTrue(value);
```
<a name="common.assertion.expectFalse"></a>
#### assertion.expectFalse(value)
Expects the passed value to be false.
**Kind**: static method of [<code>assertion</code>](#common.assertion)
| Param | Type | Description |
| --- | --- | --- |
| value | <code>Boolean</code> | The value to be false. |
**Example**
```js
common.assertion.expectFalse(false);
```
<a name="common.assertion.expectDefined"></a>
#### assertion.expectDefined(value)
Expects the passed values is defined.
**Kind**: static method of [<code>assertion</code>](#common.assertion)
| Param | Type | Description |
| --- | --- | --- |
| value | <code>Any</code> | Value to be defined (not undefined) |
**Example**
```js
common.assertion.expectDefined(value);
```
<a name="common.assertion.expectUndefined"></a>
#### assertion.expectUndefined(value)
Expects the passed values is undefined.
**Kind**: static method of [<code>assertion</code>](#common.assertion)
| Param | Type | Description |
| --- | --- | --- |
| value | <code>Any</code> | Value to be undefined |
**Example**
```js
common.assertion.expectUndefined(value);
```
<a name="common.assertion.expectUrlToBe"></a>
#### assertion.expectUrlToBe()
Expects the url to be the passed value.
**Kind**: static method of [<code>assertion</code>](#common.assertion)
**Example**
```js
await common.assertion.expectUrlToBe("www.sap.com");
```
<a name="common.assertion.expectToContain"></a>
#### assertion.expectToContain(value1, value2)
Expects the first passed value to contain the second passed value, after normalizing whitespace.
**Kind**: static method of [<code>assertion</code>](#common.assertion)
| Param | Type | Description |
| --- | --- | --- |
| value1 | <code>string</code> | The string expected to contain value2. |
| value2 | <code>string</code> | The string expected to be found within value1. |
**Example**
```js
await common.assertion.expectToContain("foo bar baz", "bar");
```
<a name="common.date"></a>
### common.date
**Kind**: static class of [<code>common</code>](#common)
* [.date](#common.date)
* [.getToday([format])](#common.date.getToday) ⇒ <code>String</code>
* [.getTomorrow([format])](#common.date.getTomorrow) ⇒ <code>String</code>
* [.getNextMonth([format])](#common.date.getNextMonth) ⇒ <code>String</code>
* [.getPreviousMonth([format])](#common.date.getPreviousMonth) ⇒ <code>String</code>
* [.getNextYear([format])](#common.date.getNextYear) ⇒ <code>String</code>
* [.getPreviousYear([format])](#common.date.getPreviousYear) ⇒ <code>String</code>
* [.getSpecific(date, [format])](#common.date.getSpecific) ⇒ <code>String</code>
* [.calculate([date], [format])](#common.date.calculate) ⇒ <code>String</code> \| <code>Date</code>
* [.getCurrentDateAndTime([format])](#common.date.getCurrentDateAndTime) ⇒ <code>String</code> \| <code>Date</code>
* [.calculateWithTime([date], [time], [format])](#common.date.calculateWithTime) ⇒ <code>String</code> \| <code>Date</code>
<a name="common.date.getToday"></a>
#### date.getToday([format]) ⇒ <code>String</code>
Returns the current day in the given format.
**Kind**: static method of [<code>date</code>](#common.date)
**Returns**: <code>String</code> - The date in the given format.
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| [format] | <code>String</code> | <code>"object"</code> | The expected format ("mm/dd/yyyy", "mm-dd-yyyy", "dd.mm.yyyy", "dd/mm/yyyy", "yyyymmdd", "yyyy/mm/dd", "yyyy.mm.dd", "yyyy-mm-dd", "dd.mm.yyyy.hh.mm", "mmm dd, yyyy", "mmm d, yyyy", "g.yy.mm.dd", "g/yy/mm/dd", "g-yy-mm-dd" "datetime", "object"). |
**Example**
```js
const date = await common.date.getToday("mm/dd/yyyy");
```
<a name="common.date.getTomorrow"></a>
#### date.getTomorrow([format]) ⇒ <code>String</code>
Returns tomorrows date in the given format.
**Kind**: static method of [<code>date</code>](#common.date)
**Returns**: <code>String</code> - The date in the given format.
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| [format] | <code>String</code> | <code>"object"</code> | The expected format ("mm/dd/yyyy", "mm-dd-yyyy", "dd.mm.yyyy", "dd/mm/yyyy", "yyyymmdd", "yyyy/mm/dd", "yyyy.mm.dd", "yyyy-mm-dd", "dd.mm.yyyy.hh.mm", "mmm dd, yyyy", "mmm d, yyyy", "g.yy.mm.dd", "g/yy/mm/dd", "g-yy-mm-dd" "datetime", "object"). |
**Example**
```js
const date = await common.date.getTomorrow("mm/dd/yyyy");
```
<a name="common.date.getNextMonth"></a>
#### date.getNextMonth([format]) ⇒ <code>String</code>
Returns the current day one month later in the given format.
**Kind**: static method of [<code>date</code>](#common.date)
**Returns**: <code>String</code> - The date in the given format.
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| [format] | <code>String</code> | <code>"object"</code> | The expected format ("mm/dd/yyyy", "mm-dd-yyyy", "dd.mm.yyyy", "dd/mm/yyyy", "yyyymmdd", "yyyy/mm/dd", "yyyy.mm.dd", "yyyy-mm-dd", "dd.mm.yyyy.hh.mm", "mmm dd, yyyy", "mmm d, yyyy", "g.yy.mm.dd", "g/yy/mm/dd", "g-yy-mm-dd" "datetime", "object"). |
**Example**
```js
const date = await common.date.getNextMonth("mm/dd/yyyy");
```
<a name="common.date.getPreviousMonth"></a>
#### date.getPreviousMonth([format]) ⇒ <code>String</code>
Returns the current day one month before in the given format.
**Kind**: static method of [<code>date</code>](#common.date)
**Returns**: <code>String</code> - The date in the given format.
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| [format] | <code>String</code> | <code>"object"</code> | The expected format ("mm/dd/yyyy", "mm-dd-yyyy", "dd.mm.yyyy", "dd/mm/yyyy", "yyyymmdd", "yyyy/mm/dd", "yyyy.mm.dd", "yyyy-mm-dd", "dd.mm.yyyy.hh.mm", "mmm dd, yyyy", "mmm d, yyyy", "g.yy.mm.dd", "g/yy/mm/dd", "g-yy-mm-dd" "datetime", "object"). |
**Example**
```js
const date = await common.date.getPreviousMonth("mm/dd/yyyy");
```
<a name="common.date.getNextYear"></a>
#### date.getNextYear([format]) ⇒ <code>String</code>
Returns the current day one year later in the given format.
**Kind**: static method of [<code>date</code>](#common.date)
**Returns**: <code>String</code> - The date in the given format.
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| [format] | <code>String</code> | <code>"object"</code> | The expected format ("mm/dd/yyyy", "mm-dd-yyyy", "dd.mm.yyyy", "dd/mm/yyyy", "yyyymmdd", "yyyy/mm/dd", "yyyy.mm.dd", "yyyy-mm-dd", "dd.mm.yyyy.hh.mm", "mmm dd, yyyy", "mmm d, yyyy", "g.yy.mm.dd", "g/yy/mm/dd", "g-yy-mm-dd" "datetime", "object"). |
**Example**
```js
const date = await common.date.getNextYear("mm/dd/yyyy");
```
<a name="common.date.getPreviousYear"></a>
#### date.getPreviousYear([format]) ⇒ <code>String</code>
Returns the current day one year before in the given format.
**Kind**: static method of [<code>date</code>](#common.date)
**Returns**: <code>String</code> - The date in the given format.
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| [format] | <code>String</code> | <code>"object"</code> | The expected format ("mm/dd/yyyy", "mm-dd-yyyy", "dd.mm.yyyy", "dd/mm/yyyy", "yyyymmdd", "yyyy/mm/dd", "yyyy.mm.dd", "yyyy-mm-dd", "dd.mm.yyyy.hh.mm", "mmm dd, yyyy", "mmm d, yyyy", "g.yy.mm.dd", "g/yy/mm/dd", "g-yy-mm-dd" "datetime", "object"). |
**Example**
```js
const date = await common.date.getPreviousYear("mm/dd/yyyy");
```
<a name="common.date.getSpecific"></a>
#### date.getSpecific(date, [format]) ⇒ <code>String</code>
Returns a specific date in the given format.
**Kind**: static method of [<code>date</code>](#common.date)
**Returns**: <code>String</code> - The date in the given format.
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| date | <code>String</code> | | A specific date string. |
| [format] | <code>String</code> | <code>"object"</code> | The expected format ("mm/dd/yyyy", "mm-dd-yyyy", "dd.mm.yyyy", "dd/mm/yyyy", "yyyymmdd", "yyyy/mm/dd", "yyyy.mm.dd", "yyyy-mm-dd", "dd.mm.yyyy.hh.mm", "mmm dd, yyyy", "mmm d, yyyy", "g.yy.mm.dd", "g/yy/mm/dd", "g-yy-mm-dd" "datetime", "object"). |
**Example**
```js
const date = await common.date.getSpecific("2020, 0, 17", "mm/dd/yyyy");
```
<a name="common.date.calculate"></a>
#### date.calculate([date], [format]) ⇒ <code>String</code> \| <code>Date</code>
Calculates the date based on the input parameter and returns it in the given format.
**Kind**: static method of [<code>date</code>](#common.date)
**Returns**: <code>String</code> \| <code>Date</code> - The calculated date in the given format.
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| [date] | <code>String</code> | <code>"today"</code> | Supported values: "today", "tomorrow", "nextMonth", "previousMonth", "nextYear", "previousYear" If the date is not provided, "today" will be used. |
| [format] | <code>String</code> | <code>"object"</code> | The expected format ("mm/dd/yyyy", "mm-dd-yyyy", "dd.mm.yyyy", "dd/mm/yyyy", "yyyymmdd", "yyyy/mm/dd", "yyyy.mm.dd", "yyyy-mm-dd", "dd.mm.yyyy.hh.mm", "mmm dd, yyyy", "mmm d, yyyy", "g.yy.mm.dd", "g/yy/mm/dd", "g-yy-mm-dd" "datetime", "object"). |
**Example**
```js
const date = await common.date.calculate("today", "mm/dd/yyyy");
```
<a name="common.date.getCurrentDateAndTime"></a>
#### date.getCurrentDateAndTime([format]) ⇒ <code>String</code> \| <code>Date</code>
Returns the current date and time in the given format.
**Kind**: static method of [<code>date</code>](#common.date)
**Returns**: <code>String</code> \| <code>Date</code> - The calculated date and time in the given format.
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| [format] | <code>String</code> | <code>"object"</code> | The expected format as a string, which consists of date and time formats, separated by a whitespace or another delimiter. Supported formats are the same as for the [calculateWithTime](#common.date.calculateWithTime) method.<br> |
**Example**
```js
const date = common.date.getCurrentDateAndTime("mm/dd/yyyy HH:mm:ss");
// returns a string like "06/17/2025 08:17:27"
```
**Example**
```js
const date = common.date.getCurrentDateAndTime();
// returns a Date object like "Tue Jun 17 2025 08:17:27 GMT+0200 (Central European Summer Time)"
```
<a name="common.date.calculateWithTime"></a>
#### date.calculateWithTime([date], [time], [format]) ⇒ <code>String</code> \| <code>Date</code>
Calculates the date and time based on the input parameter and returns it in the given format.
**Kind**: static method of [<code>date</code>](#common.date)
**Returns**: <code>String</code> \| <code>Date</code> - The calculated date and time in the given format.
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| [date] | <code>String</code> | <code>"today"</code> | Supported values: "today", "tomorrow", "nextMonth", "previousMonth", "nextYear", "previousYear". |
| [time] | <code>String</code> | | The time of day. Supported formats: "HH:MM:SS" (e.g. "10:30:20"), "HH:MM" (e.g. "10:30"), "HH" (e.g. "10"). It can also be in 12-hour format with AM/PM (e.g. "10:30 PM", "3 AM"). It can also be a time anchor, such as "currentTime", "startOfDay", or "endOfDay".<br> If not provided, the time will default to the "startOfDay". |
| [format] | <code>String</code> | <code>"object"</code> | The expected output format as a string, which consists of <b>date and time formats, separated by a whitespace or another delimiter</b> (such as 'T' substring).<br> - Supported <b>date</b> formats are the same as for the [calculate](#common.date.calculate) method.<br> - Supported <b>time</b> formats are the following: "HH\:mm:ss" (24-hour format), "h\:mm:ss a" (12-hour format), "HH\:mm:ss z" (24-hour format with timezone), "h\:mm:ss a z" (12-hour format with timezone), "HH\:mm" (24-hour format), "h\:mm a" (12-hour format), "HH" (24-hour format), "h a" (12-hour format).<br> - Examples of <b>expected format</b>: "datetime", "object", "mm/dd/yyyy HH\:mm:ss", "dd.mm.yyyy h\:mm:ss a", "dd/mm/yyyy HH\:mm:ss z", "yyyymmddTh\:mm:ss a z", "yyyy/mm/dd HH\:mm", "mmm dd, yyyy h\:mm a", "mmm d, yyyy HH", "mmm d, yyyy h a", and other combinations of supported date and time formats.<br> |
**Example**
```js
const date = common.date.calculateWithTime("today", "10:00");
// returns a Date object like "Tue Jun 17 2025 08:17:27 GMT+0200 (Central European Summer Time)"
```
**Example**
```js
const date = common.date.calculateWithTime("today", "10:00:00", "mm/dd/yyyy HH:mm:ss");
// returns a string like "06/17/2025 10:00:00"
```
**Example**
```js
const date = common.date.calculateWithTime("nextMonth", "9:00 PM", "mm-dd-yyyy h:mm a");
// returns a string like "07-17-2025 9:00 PM"
```
**Example**
```js
const date = common.date.calculateWithTime("previousMonth", "22:00:45", "dd.mm.yyyy HH:mm:ss");
// returns a string like "17.05.2025 22:00:45"
```
**Example**
```js
const date = common.date.calculateWithTime("nextYear", "3 AM", "dd/mm/yyyy h a");
// returns a string like "17/06/2026 3 AM"
```
**Example**
```js
const date = common.date.calculateWithTime("previousYear", "15:30", "yyyymmddTHH:mm");
// returns a string like "20240617T15:30"
```
**Example**
```js
const date = common.date.calculateWithTime("tomorrow", "10:00:50", "mmm dd, yyyy HH:mm:ss z");
// returns a string like "Jun 18, 2025 10:00:50 GMT+02:00"
```
**Example**
```js
const date = common.date.calculateWithTime("today", "startOfDay", "dd.mm.yyyy HH:mm:ss");
// returns a string like "17.06.2025 00:00:00"
```
<a name="common.navigation"></a>
### common.navigation
**Kind**: static class of [<code>common</code>](#common)
* [.navigation](#common.navigation)
* [.navigateToUrl(url)](#common.navigation.navigateToUrl)
* [.navigateToUrlAndRetry(url, [retries], [interval])](#common.navigation.navigateToUrlAndRetry)
<a name="common.navigation.navigateToUrl"></a>
#### navigation.navigateToUrl(url)
Navigates to the passed url.
**Kind**: static method of [<code>navigation</code>](#common.navigation)
| Param | Type | Description |
| --- | --- | --- |
| url | <code>String</code> | The url. |
**Example**
```js
await common.navigation.navigateToUrl("www.sap.com");
```
<a name="common.navigation.navigateToUrlAndRetry"></a>
#### navigation.navigateToUrlAndRetry(url, [retries], [interval])
Navigates to the passed url and retries the function in case of a failure.
**Kind**: static method of [<code>navigation</code>](#common.navigation)
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| url | <code>String</code> | | The url to navigate to. |
| [retries] | <code>Integer</code> | <code>3</code> | The number of retries, can be set in config for all functions under params stepsRetries. |
| [interval] | <code>Integer</code> | <code>5000</code> | The interval of the retries (ms), can be set in config for all functions under params stepRetriesIntervals. |
**Example**
```js
await common.navigation.navigateToUrlAndRetry("www.sap.com");
```
<a name="common.userInteraction"></a>
### common.userInteraction
**Kind**: static class of [<code>common</code>](#common)
* [.userInteraction](#common.userInteraction)
* [.fillActive(value)](#common.userInteraction.fillActive)
* [.fillActiveAndRetry(value, [retries], [interval])](#common.userInteraction.fillActiveAndRetry)
* [.clearAndFillActive(value)](#common.userInteraction.clearAndFillActive)
* [.clearAndFillActiveAndRetry(value, [retries], [interval])](#common.userInteraction.clearAndFillActiveAndRetry)
* [.pressKey(keys)](#common.userInteraction.pressKey)
* [.pressEnter()](#common.userInteraction.pressEnter)
* [.pressTab()](#common.userInteraction.pressTab)
* [.pressF4()](#common.userInteraction.pressF4)
* [.pressBackspace()](#common.userInteraction.pressBackspace)
* [.pressEscape()](#common.userInteraction.pressEscape)
* [.pressArrowLeft()](#common.userInteraction.pressArrowLeft)
* [.pressArrowRight()](#common.userInteraction.pressArrowRight)
<a name="common.userInteraction.fillActive"></a>
#### userInteraction.fillActive(value)
Fills the active input with the given value.
**Kind**: static method of [<code>userInteraction</code>](#common.userInteraction)
| Param | Type | Description |
| --- | --- | --- |
| value | <code>String</code> \| <code>Number</code> | The value to enter. |
**Example**
```js
await common.userInteraction.fillActive("My Value");
```
<a name="common.userInteraction.fillActiveAndRetry"></a>
#### userInteraction.fillActiveAndRetry(value, [retries], [interval])
Enters the given value to the active input field and retries the action in case it fails.
**Kind**: static method of [<code>userInteraction</code>](#common.userInteraction)
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| value | <code>String</code> | | The value to enter. |
| [retries] | <code>Number</code> | <code>3</code> | The number of retries, can be set in config for all functions under params stepsRetries. |
| [interval] | <code>Number</code> | <code>5000</code> | The delay between the retries (ms). Can be set in config for all functions under params.stepRetriesIntervals. |
**Example**
```js
await common.userInteraction.fillActiveAndRetry("My Value");
```
<a name="common.userInteraction.clearAndFillActive"></a>
#### userInteraction.clearAndFillActive(value)
Clears and fills the active input.
**Kind**: static method of [<code>userInteraction</code>](#common.userInteraction)
| Param | Type | Description |
| --- | --- | --- |
| value | <code>String</code> | The value to fill. |
**Example**
```js
await common.userInteraction.clearAndFillActive("My Value");
```
<a name="common.userInteraction.clearAndFillActiveAndRetry"></a>
#### userInteraction.clearAndFillActiveAndRetry(value, [retries], [interval])
CClears and fills the active input. Retries the action in case of a failure.
**Kind**: static method of [<code>userInteraction</code>](#common.userInteraction)
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| value | <code>String</code> | | The value to fill. |
| [retries] | <code>Number</code> | <code>3</code> | The number of retries, can be set in config for all functions under params stepsRetries. |
| [interval] | <code>Number</code> | <code>5000</code> | The delay between the retries (ms). Can be set in config for all functions under params.stepRetriesIntervals. |
**Example**
```js
await common.userInteraction.clearAndFillActiveAndRetry("My Value");
```
<a name="common.userInteraction.pressKey"></a>
#### userInteraction.pressKey(keys)
Performs the specified keypress. Possible values: <a href="https://w3c.github.io/webdriver/#keyboard-actions" target="_blank">WebDriver Keyboard Actions</a>
**Kind**: static method of [<code>userInteraction</code>](#common.userInteraction)
| Param | Type | Description |
| --- | --- | --- |
| keys | <code>String</code> \| <code>Array.<String></code> | The key or combination of keys to execute. |
**Example**
```js
await common.userInteraction.pressKey("Enter");
```
**Example**
```js
await common.userInteraction.pressKey("\uE004");
```
**Example**
```js
await common.userInteraction.pressKey(["\uE009", "Alt"]);
```
<a name="common.userInteraction.pressEnter"></a>
#### userInteraction.pressEnter()
Performs the Enter keypress.
**Kind**: static method of [<code>userInteraction</code>](#common.userInteraction)
**Example**
```js
await common.userInteraction.pressEnter();
```
<a name="common.userInteraction.pressTab"></a>
#### userInteraction.pressTab()
Performs the Tab keypress.
**Kind**: static method of [<code>userInteraction</code>](#common.userInteraction)
**Example**
```js
await common.userInteraction.pressTab();
```
<a name="common.userInteraction.pressF4"></a>
#### userInteraction.pressF4()
Performs the F4 keypress.
**Kind**: static method of [<code>userInteraction</code>](#common.userInteraction)
**Example**
```js
await common.userInteraction.pressF4();
```
<a name="common.userInteraction.pressBackspace"></a>
#### userInteraction.pressBackspace()
Performs the Backspace keypress.
**Kind**: static method of [<code>userInteraction</code>](#common.userInteraction)
**Example**
```js
await common.userInteraction.pressBackspace();
```
<a name="common.userInteraction.pressEscape"></a>
#### userInteraction.pressEscape()
Performs the Escape keypress.
**Kind**: static method of [<code>userInteraction</code>](#common.userInteraction)
**Example**
```js
await common.userInteraction.pressEscape();
```
<a name="common.userInteraction.pressArrowLeft"></a>
#### userInteraction.pressArrowLeft()
Performs the Arrow Left keypress.
**Kind**: static method of [<code>userInteraction</code>](#common.userInteraction)
**Example**
```js
await common.userInteraction.pressArrowLeft();
```
<a name="common.userInteraction.pressArrowRight"></a>
#### userInteraction.pressArrowRight()
Performs the Arrow Right keypress.
**Kind**: static method of [<code>userInteraction</code>](#common.userInteraction)
**Example**
```js
await common.userInteraction.pressArrowRight();
```
<a name="util"></a>
## util
Global namespace for util modules.
**Kind**: global constant
* [util](#util)
* [.browser](#util.browser)
* [.getBaseUrl()](#util.browser.getBaseUrl) ⇒ <code>String</code>
* [.setBaseUrl(baseUrl:)](#util.browser.setBaseUrl)
* [.logCurrentUrl()](#util.browser.logCurrentUrl)
* [.getCurrentUrl()](#util.browser.getCurrentUrl)
* [.resetFocus()](#util.browser.resetFocus)
* [.sleep([duration])](#util.browser.sleep)
* [.collectCoverage()](#util.browser.collectCoverage)
* [.sleepAndCollectCoverage([duration])](#util.browser.sleepAndCollectCoverage)
* [.refresh()](#util.browser.refresh)
* [.clearBrowser([clearLocal], [clearSession], [clearCookies])](#util.browser.clearBrowser)
* [.getBrowserName()](#util.browser.getBrowserName) ⇒ <code>String</code>
* [.getUI5Version([timeout])](#util.browser.getUI5Version)
* [.logUI5Version()](#util.browser.logUI5Version)
* [.executeScript(command)](#util.browser.executeScript) ⇒ <code>Any</code>
* [.waitUntil(condition, [options])](#util.browser.waitUntil) ⇒ <code>Promise.<void></code>
* [.switchToNewWindow(titleOrUrl, [timeout])](#util.browser.switchToNewWindow)
* [.switchToWindow(handle)](#util.browser.switchToWindow)
* [.getCurrentWindow()](#util.browser.getCurrentWindow) ⇒ <code>Object</code>
* [.switchToIframe(selector)](#util.browser.switchToIframe)
* [.switchToDefaultContent()](#util.browser.switchToDefaultContent)
* [.back()](#util.browser.back)
* [.forward()](#util.browser.forward)
* [.log(message)](#util.browser.log)
* [.warn(message)](#util.browser.warn)
* [.error(message)](#util.browser.error)
* [.isMobile()](#util.browser.isMobile) ⇒ <code>boolean</code>
* [.isAndroid()](#util.browser.isAndroid) ⇒ <code>boolean</code>
* [.isIos()](#util.browser.isIos) ⇒ <code>boolean</code>
* [.component](#util.component)
* [new component()](#new_util.component_new)
* [.loadEntryPoint([folderPath])](#util.component.loadEntryPoint) ⇒ <code>Object</code>
* [.storeEntryPoint(data, [folderPath])](#util.component.storeEntryPoint)
* [.console](#util.console)
* [.log(message, [textColor], [backgroundColor], [brightness])](#util.console.log)
* [.error(message)](#util.console.error)
* [.warn(message)](#util.console.warn)
* [.success(message)](#util.console.success)
* [.info(message)](#util.console.info)
* [.data](#util.data)
* [.getData(filename, [source])](#util.data.getData) ⇒ <code>Object</code>
* [.getSecureData(filename, [source], [options])](#util.data.getSecureData) ⇒ <code>Object</code>
* [.readDataFromFile(filePath)](#util.data.readDataFromFile) ⇒ <code>Object</code>
* [.writeDataToFile(filePath, data)](#util.data.writeDataToFile)
* [.decrypt(data, options)](#util.data.decrypt) ⇒ <code>String</code>
* [.file](#util.file)
* [.upload(files, [selector])](#util.file.upload)
* [.uploadWebGui(files, selector)](#util.file.uploadWebGui)
* [.parsePdf(pdfStream, renderingMethod)](#util.file.parsePdf) ⇒ <code>String</code>
* [.expectPdfContainsText(pdfStream, text, renderingMethod)](#util.file.expectPdfContainsText)
* [.expectPdfNotContainsText(pdfStream, text, renderingMethod)](#util.file.expectPdfNotContainsText)
* [.getExcelData(filePath, fileName, [sheetIndex], [conversionType])](#util.file.getExcelData)
* [.getTextData(filePath)](#util.file.getTextData)
* [.expectTextDataToContain(filePath)](#util.file.expectTextDataToContain)
* [.getXmlData(filePath)](#util.file.getXmlData)
* [.getAttributeValuesFromJson(object)](#util.file.getAttributeValuesFromJson)
* [.findFilePathRecursively(directory, fileName)](#util.file.findFilePathRecursively)
* [.getFileNamesByExtensions(dirPath, fileExtensions)](#util.file.getFileNamesByExtensions)
* [.formatter](#util.formatter)
* [.sliceStringAt(input, slicePoint, length)](#util.formatter.sliceStringAt) ⇒ <code>String</code>
* [.sliceStringAfter(input, slicePoint, length)](#util.formatter.sliceStringAfter) ⇒ <code>String</code>
* [.trimString(input)](#util.formatter.trimString)
* [.extractNumberFromString(input, [index])](#util.formatter.extractNumberFromString) ⇒ <code>String</code>
* [.stringifyJSON(object)](#util.formatter.stringifyJSON) ⇒ <code>String</code>
* [.addRemoveLeadingZeros(number, length)](#util.formatter.addRemoveLeadingZeros) ⇒ <code>String</code>
* [.formatDate(date, format, [locale])](#util.formatter.formatDate) ⇒ <code>String</code>
* [.formatDateWithTime(date, format, [locale])](#util.formatter.formatDateWithTime) ⇒ <code>String</code> \| <code>Date</code>
* [.function](#util.function)
* [.retry(fct, args, [retries], [interval], [scope])](#util.function.retry)
* [.executeOptional(fct, args)](#util.function.executeOptional)
* [.system](#util.system)
* [.getOS()](#util.system.getOS) ⇒ <code>String</code>
* [.userSettings](#util.userSettings)
<a name="util.browser"></a>
### util.browser
**Kind**: static class of [<code>util</code>](#util)
* [.browser](#util.browser)
* [.getBaseUrl()](#util.browser.getBaseUrl) ⇒ <code>String</code>
* [.setBaseUrl(baseUrl:)](#util.browser.setBaseUrl)
* [.logCurrentUrl()](#util.browser.logCurrentUrl)
* [.getCurrentUrl()](#util.browser.getCurrentUrl)
* [.resetFocus()](#util.browser.resetFocus)
* [.sleep([duration])](#util.browser.sleep)
* [.collectCoverage()](#util.browser.collectCoverage)
* [.sleepAndCollectCoverage([duration])](#util.browser.sleepAndCollectCoverage)
* [.refresh()](#util.browser.refresh)
* [.clearBrowser([clearLocal], [clearSession], [clearCookies])](#util.browser.clearBrowser)
* [.getBrowserName()](#util.browser.getBrowserName) ⇒ <code>String</code>
* [.getUI5Version([timeout])](#util.browser.getUI5Version)
* [.logUI5Version()](#util.browser.logUI5Version)
* [.executeScript(command)](#util.browser.executeScript) ⇒ <code>Any</code>
* [.waitUntil(condition, [options])](#util.browser.waitUntil) ⇒ <code>Promise.<void></code>
* [.switchToNewWindow(titleOrUrl, [timeout])](#util.browser.switchToNewWindow)
* [.switchToWindow(handle)](#util.browser.switchToWindow)
* [.getCurrentWindow()](#util.browser.getCurrentWindow) ⇒ <code>Object</code>
* [.switchToIframe(selector)](#util.browser.switchToIframe)
* [.switchToDefaultContent()](#util.browser.switchToDefaultContent)
* [.back()](#util.browser.back)
* [.forward()](#util.browser.forward)
* [.log(message)](#util.browser.log)
* [.warn(message)](#util.browser.warn)
* [.error(message)](#util.browser.error)
* [.isMobile()](#util.browser.isMobile) ⇒ <code>boolean</code>
* [.isAndroid()](#util.browser.isAndroid) ⇒ <code>boolean</code>
* [.isIos()](#util.browser.isIos) ⇒ <code>boolean</code>
<a name="util.browser.getBaseUrl"></a>
#### browser.getBaseUrl() ⇒ <code>String</code>
Retrieves the baseUrl from the configuration file.
**Kind**: static method of [<code>browser</code>](#util.browser)
**Returns**: <code>String</code> - The baseUrl.
**Example**
```js
const baseUrl = util.browser.getBaseUrl();
```
<a name="util.browser.setBaseUrl"></a>
#### browser.setBaseUrl(baseUrl:)
Sets or overwrites the baseUrl in the configuration file.
**Kind**: static method of [<code>browser</code>](#util.browser)
| Param | Type | Description |
| --- | --- | --- |
| baseUrl: | <code>String</code> | base URL to set |
**Example**
```js
await util.browser.setBaseUrl("https://www.sap.com");
```
<a name="util.browser.logCurrentUrl"></a>
#### browser.logCurrentUrl()
Displays the current URL in the console.
**Kind**: static method of [<code>browser</code>](#util.browser)
**Example**
```js
await util.browser.logCurrentUrl();
```
<a name="util.browser.getCurrentUrl"></a>
#### browser.getCurrentUrl()
Returns the current URL
**Kind**: static method of [<code>browser</code>](#util.browser)
**Example**
```js
await util.browser.getCurrentUrl();
```
<a name="util.browser.resetFocus"></a>
#### browser.resetFocus()
Resets the focus in case it set for a specific element.
**Kind**: static method of [<code>browser</code>](#util.browser)
**Example**
```js
await util.browser.resetFocus();
```
<a name="util.browser.sleep"></a>
#### browser.sleep([duration])
Sleeps (pauses execution) for the passed duration.
**Kind**: static method of [<code>browser</code>](#util.browser)
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| [duration] | <code>Number</code> | <code>1000</code> | The time to pause (ms). |
**Example**
```js
await util.browser.sleep(30000);
```
<a name="util.browser.collectCoverage"></a>
#### browser.collectCoverage()
Trigger collection of coverage by coverage service.
**Kind**: static method of [<code>browser</code>](#util.browser)
**Example**
```js
await util.browser.collectCoverage();
```
<a name="util.browser.sleepAndCollectCoverage"></a>
#### browser.sleepAndCollectCoverage([duration])
Trigger collection of coverage by coverage service.
**Kind**: static method of [<code>browser</code>](#util.browser)
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| [duration] | <code>Number</code> | <code>1000</code> | The time to pause (ms). |
**Example**
```js
await util.browser.sleepAndCollectCoverage(3000);
```
<a name="util.browser.refresh"></a>
#### browser.refresh()
Refreshes the page.
**Kind**: static method of [<code>browser</code>](#util.browser)
**Example**
```js
await util.browser.refresh();
```
<a name="util.browser.clearBrowser"></a>
#### browser.clearBrowser([clearLocal], [clearSession], [clearCookies])
Clears the local and session cache and deletes all browser cookies.
**Kind**: static method of [<code>browser</code>](#util.browser)
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| [clearLocal] | <code>Boolean</code> | <code>true</code> | Specifies if the local cache will be cleared. |
| [clearSession] | <code>Boolean</code> | <code>true</code> | Specifies if the session cache will be cleared. |
| [clearCookies] | <code>Boolean</code> | <code>true</code> | Specifies if the cookies will be cleared. |
**Example**
```js
await util.browser.clearBrowser();
```
<a name="util.browser.getBrowserName"></a>
#### browser.getBrowserName() ⇒ <code>String</code>
Retrieves the name of the current browser.
**Kind**: static method of [<code>browser</code>](#util.browser)
**Returns**: <code>String</code> - The browser name.
**Example**
```js
const browserName = util.browser.getBrowserName();
```
<a name="util.browser.getUI5Version"></a>
#### browser.getUI5Version([timeout])
Gets the UI5 version and creation date for UI5 based applications.
**Kind**: static method of [<code>browser</code>](#util.browser)
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| [timeout] | <code>Number</code> | <code>30000</code> | The timeout to wait (ms). |
**Example**
```js
await util.browser.getUI5Version();
```
<a name="util.browser.logUI5Version"></a>
#### browser.logUI5Version()
Logs the UI5 version and creation date for UI5 based applications to the console.
**Kind**: static method of [<code>browser</code>](#util.browser)
**Example**
```js
await util.browser.logUI5Version();
```
<a name="util.browser.executeScript"></a>
#### browser.executeScript(command) ⇒ <code>Any</code>
Executes the specified JavaScript command.
**Kind**: static method of [<code>browser</code>](#util.browser)
**Returns**: <code>Any</code> - The result from the executed function.
| Param | Type | Description |
| --- | --- | --- |
| command | <code>String</code> \| <code>function</code> | The command to execute. |
**Example**
```js
await util.browser.executeScript(command);
```
<a name="util.browser.waitUntil"></a>
#### browser.waitUntil(condition, [options]) ⇒ <code>Promise.<void></code>
Waits until the specified function returns true or the timeout is reached.
**Kind**: static method of [<code>browser</code>](#util.browser)
**Returns**: <code>Promise.<void></code> - Resolves when the function returns true or the timeout is reached.
| Param | Type | Description |
| --- | --- | --- |
| condition | <code>function</code> | The function to wait for. |
| [options] | <code>Object</code> | Options for the wait. |
| [options.timeout] | <code>Number</code> | The timeout to wait (ms). |
| [options.timeoutMsg] | <code>String</code> | The message to display if the timeout is reached. |
| [options.interval] | <code>Number</code> | The interval to check the function (ms). |
**Example**
```js
await util.browser.waitUntil(async () => await ui5.element.isVisible(selector), { timeout: 5000, timeoutMsg: "Element not visible" });
```
<a name="util.browser.switchToNewWindow"></a>
#### browser.switchToNewWindow(titleOrUrl, [timeout])
Switches to the window or tab with the given title.
**Kind**: static method of [<code>browser</code>](#util.browser)
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| titleOrUrl | <code>String</code> \| <code>RegExp</code> | | Window title or url of the expected window or tab (can be either a string or part of it as regular expression). |
| [timeout] | <code>Number</code> | <code>10000</code> | The timeout to wait (ms). |
**Example**
```js
await util.browser.switchToNewWindow("SAP - Home");
```
**Example**
```js
await util.browser.switchToNewWindow(/Home/);
```
**Example**
```js
await util.browser.switchToNewWindow("www.sap.com");
```
<a name="util.browser.switchToWindow"></a>
#### browser.switchToWindow(handle)
Switches to the passed window.
**Kind**: static method of [<code>browser</code>](#util.browser)
| Param | Type | Description |
| --- | --- | --- |
| handle | <code>Object</code> | The window handle. |
**Example**
```js
await util.browser.switchToWindow(originalWindowHandle);
```
<a name="util.browser.getCurrentWindow"></a>
#### browser.getCurrentWindow() ⇒ <code>Object</code>
Returns the current window handle.
**Kind**: static method of [<code>browser</code>](#util.browser)
**Returns**: <code>Object</code> - The window handle.
**Example**
```js
const originalWindowHandle = await util.browser.getCurrentWindow();
```
<a name="util.browser.switchToIframe"></a>
#### browser.switchToIframe(selector)
Switches to the passed iframe.
**Kind**: static method of [<code>browser</code>](#util.browser)
| Param | Type | Description |
| --- | --- | --- |
| selector | <code>String</code> | The CSS selector describing the iframe element. |
**Example**
```js
await util.browser.switchToIframe("iframe[id='frame01']");
```
<a name="util.browser.switchToDefaultContent"></a>
#### browser.switchToDefaultContent()
Switches to the default content of the HTML page.
**Kind**: static method of [<code>browser</code>](#util.browser)
**Example**
```js
await util.browser.switchToDefaultContent();
```
<a name="util.browser.back"></a>
#### browser.back()
Go one step back in browser history.
**Kind**: static method of [<code>browser</code>](#util.browser)
**Example**
```js
await util.browser.back();
```
<a name="util.browser.forward"></a>
#### browser.forward()
Go one step ahead in browser history.
**Kind**: static method of [<code>browser</code>](#util.browser)
**Example**
```js
await util.browser.forward();
```
<a name="util.browser.log"></a>
#### browser.log(message)
add log message to browser logs, can be viewed in the html report
**Kind**: static method of [<code>browser</code>](#util.browser)
| Param | Type | Description |
| --- | --- | --- |
| message | <code>String</code> | string - The message to be logged. |
**Example**
```js
await util.browser.log("Created PO 123456");
```
<a name="util.browser.warn"></a>
#### browser.warn(message)
add warning message to browser logs, can be viewed in the html report
**Kind**: static method of [<code>browser</code>](#util.browser)
| Param | Type | Description |
| --- | --- | --- |
| message | <code>String</code> | string - The warning message to be logged. |
**Example**
```js
await util.browser.warn("This is a warning message");
```
<a name="util.browser.error"></a>
#### browser.error(message)
add error message to browser logs, can be viewed in the html report
**Kind**: static method of [<code>browser</code>](#util.browser)
| Param | Type | Description |
| --- | --- | --- |
| message | <code>String</code> | string - The error message to be logged. |
**Example**
```js
await util.browser.error("This is an error message");
```
<a name="util.browser.isMobile"></a>
#### browser.isMobile() ⇒ <code>boolean</code>
Indicates a mobile session
**Kind**: static method of [<code>browser</code>](#util.browser)
**Returns**: <code>boolean</code> - Return true if its a mobile session driver.
**Example**
```js
await util.browser.isMobile();
```
<a name="util.browser.isAndroid"></a>
#### browser.isAndroid() ⇒ <code>boolean</code>
Indicates a mobile session
**Kind**: static method of [<code>browser</code>](#util.browser)
**Returns**: <code>boolean</code> - Return true if its a Android session driver.
**Example**
```js
await util.browser.isAndroid();
```
<a name="util.browser.isIos"></a>
#### browser.isIos() ⇒ <code>boolean</code>
Indicates an iOS session
**Kind**: static method of [<code>browser</code>](#util.browser)
**Returns**: <code>boolean</code> - Return true if its a iOS session driver.
**Example**
```js
await util.browser.isIos();
```
<a name="util.component"></a>
### util.component
**Kind**: static class of [<code>util</code>](#util)
* [.component](#util.component)
* [new component()](#new_util.component_new)
* [.loadEntryPoint([folderPath])](#util.component.loadEntryPoint) ⇒ <code>Object</code>
* [.storeEntryPoint(data, [folderPath])](#util.component.storeEntryPoint)
<a name="new_util.component_new"></a>
#### new component()
This class provides functions for writing component tests with qmate-proxy-service
<a name="util.component.loadEntryPoint"></a>
#### component.loadEntryPoint([folderPath]) ⇒ <code>Object</code>
Will be called in component test scripts. Returns a previously stored entry point object for sharing information (like a draft id) between preparation and the actual component tests.
**Kind**: static method of [<code>component</code>](#util.component)
**Returns**: <code>Object</code> - The data object of the stored entry point.
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| [folderPath] | <code>String</code> | <code>"./entrypoints"</code> | Custom folder path where entry points are stored. |
**Example**
```js
const entryPoint = util.component.loadEntryPoint();
```
<a name="util.component.storeEntryPoint"></a>
#### component.storeEntryPoint(data, [folderPath])
Will be called in preparation scripts before component tests. Stores an entry point object for sharing information (like a draft id) between preparation and the actual component tests.
**Kind**: static method of [<code>component</code>](#util.component)
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| data | <code>Object</code> | | The data object of the entry point to store. |
| [folderPath] | <code>String</code> | <code>"./entrypoints"</code> | Custom folder path where entry points are stored. |
**Example**
```js
const entryPoint = util.component.storeEntryPoint({"draftId": "0123456789"});
```
<a name="util.console"></a>
### util.console
**Kind**: static class of [<code>util</code>](#util)
* [.console](#util.console)
* [.log(message, [textColor], [backgroundColor], [brightness])](#util.console.log)
* [.error(message)](#util.console.error)
* [.warn(message)](#util.console.warn)
* [.success(message)](#util.console.success)
* [.info(message)](#util.console.info)
<a name="util.console.log"></a>
#### console.log(message, [textColor], [backgroundColor], [brightness])
Logs a message to the console in the given color.
**Kind**: static method of [<code>console</code>](#util.console)
| Param | Type | Description |
| --- | --- | --- |
| message | <code>String</code> | The message to log. |
| [textColor] | <code>String</code> | The color of the text: "black, white", "red", "yellow", "green", "blue", "cyan", "magenta". |
| [backgroundColor] | <code>String</code> | The color of the background: "black, white", "red", "yellow", "green", "blue", "cyan", "magenta". |
| [brightness] | <code>String</code> | Adjusts the brightness of the color: "bright", "dim". Leave empty for default. |
**Example**
```js
util.console.log("The document has been saved.", "green");
```
<a name="util.console.error"></a>
#### console.error(message)
Logs a error message to the console in red.
**Kind**: static method of [<code>console</code>](#util.console)
| Param | Type | Description |
| --- | --- | --- |
| message | <code>String</code> | The message to log. |
**Example**
```js
util.console.error("Error: Please investigate.");
```
<a name="util.console.warn"></a>
#### console.warn(message)
Logs a warning message to the console in yellow.
**Kind**: static method of [<code>console</code>](#util.console)
| Param | Type | Description |
| --- | --- | --- |
| message | <code>String</code> | The message to log. |
**Example**
```js
util.console.warn("Optional step not executed.");
```
<a name="util.console.success"></a>
#### console.success(message)
Logs a success message to the console in green.
**Kind**: static method of [<code>console</code>](#util.console)
| Param | Type | Description |
| --- | --- | --- |
| message | <code>String</code> | The message to log. |
**Example**
```js
util.console.success("The document has been saved.");
```
<a name="util.console.info"></a>
#### console.info(message)
Logs a info message to the console in cyan.
**Kind**: static method of [<code>console</code>](#util.console)
| Param | Type | Description |
| --- | --- | --- |
| message | <code>String</code> | The message to log. |
**Example**
```js
util.console.success("The document has been saved.");
```
<a name="util.data"></a>
### util.data
**Kind**: static class of [<code>util</code>](#util)
* [.data](#util.data)
* [.getData(filename, [source])](#util.data.getData) ⇒ <code>Object</code>
* [.getSecureData(filename, [source], [options])](#util.data.getSecureData) ⇒ <code>Object</code>
* [.readDataFromFile(filePath)](#util.data.readDataFromFile) ⇒ <code>Object</code>
* [.writeDataToFile(filePath, data)](#util.data.writeDataToFile)
* [.decrypt(data, options)](#util.data.decrypt) ⇒ <code>String</code>
<a name="util.data.getData"></a>
#### data.getData(filename, [source]) ⇒ <code>Object</code>
Returns the data object with the given filename (JSON, stored in data folder).
**Kind**: static met