@sap_oss/wdio-qmate-service 2.7.3 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/doc.md CHANGED
@@ -567,6 +567,7 @@ Global namespace for util modules.
567
567
  * [.switchToIframe(selector)](#util.browser.switchToIframe)
568
568
  * [.switchToDefaultContent()](#util.browser.switchToDefaultContent)
569
569
  * [.back()](#util.browser.back)
570
+ * [.forward()](#util.browser.forward)
570
571
  * [.log(message)](#util.browser.log)
571
572
  * [.warn(message)](#util.browser.warn)
572
573
  * [.error(message)](#util.browser.error)
@@ -585,7 +586,7 @@ Global namespace for util modules.
585
586
  * [.getSecureData(filename, [source])](#util.data.getSecureData) ⇒ <code>Object</code>
586
587
  * [.readDataFromFile(filePath)](#util.data.readDataFromFile) ⇒ <code>Object</code>
587
588
  * [.writeDataToFile(filePath, data)](#util.data.writeDataToFile)
588
- * [.decrypt(data)](#util.data.decrypt) ⇒ <code>Object</code>
589
+ * [.decrypt(data)](#util.data.decrypt) ⇒ <code>String</code>
589
590
  * [.file](#util.file)
590
591
  * [.upload(files, [selector])](#util.file.upload)
591
592
  * [.uploadWebGui(files, selector)](#util.file.uploadWebGui)
@@ -639,6 +640,7 @@ Global namespace for util modules.
639
640
  * [.switchToIframe(selector)](#util.browser.switchToIframe)
640
641
  * [.switchToDefaultContent()](#util.browser.switchToDefaultContent)
641
642
  * [.back()](#util.browser.back)
643
+ * [.forward()](#util.browser.forward)
642
644
  * [.log(message)](#util.browser.log)
643
645
  * [.warn(message)](#util.browser.warn)
644
646
  * [.error(message)](#util.browser.error)
@@ -903,6 +905,16 @@ Go one step back in browser history.
903
905
  ```js
904
906
  await util.browser.back();
905
907
  ```
908
+ <a name="util.browser.forward"></a>
909
+
910
+ #### browser.forward()
911
+ Go one step ahead in browser history.
912
+
913
+ **Kind**: static method of [<code>browser</code>](#util.browser)
914
+ **Example**
915
+ ```js
916
+ await util.browser.forward();
917
+ ```
906
918
  <a name="util.browser.log"></a>
907
919
 
908
920
  #### browser.log(message)
@@ -1095,7 +1107,7 @@ util.console.success("The document has been saved.");
1095
1107
  * [.getSecureData(filename, [source])](#util.data.getSecureData) ⇒ <code>Object</code>
1096
1108
  * [.readDataFromFile(filePath)](#util.data.readDataFromFile) ⇒ <code>Object</code>
1097
1109
  * [.writeDataToFile(filePath, data)](#util.data.writeDataToFile)
1098
- * [.decrypt(data)](#util.data.decrypt) ⇒ <code>Object</code>
1110
+ * [.decrypt(data)](#util.data.decrypt) ⇒ <code>String</code>
1099
1111
 
1100
1112
  <a name="util.data.getData"></a>
1101
1113
 
@@ -1165,11 +1177,11 @@ const data = util.data.writeDataToFile("myTest");
1165
1177
  ```
1166
1178
  <a name="util.data.decrypt"></a>
1167
1179
 
1168
- #### data.decrypt(data) ⇒ <code>Object</code>
1180
+ #### data.decrypt(data) ⇒ <code>String</code>
1169
1181
  Decrypts the passed input data.
1170
1182
 
1171
1183
  **Kind**: static method of [<code>data</code>](#util.data)
1172
- **Returns**: <code>Object</code> - The decrypted data.
1184
+ **Returns**: <code>String</code> - The decrypted data.
1173
1185
 
1174
1186
  | Param | Type | Description |
1175
1187
  | --- | --- | --- |
@@ -2379,7 +2391,7 @@ Picks the passed date using the "DatePicker" with the given selector.
2379
2391
  **Example**
2380
2392
  ```js
2381
2393
  const today = await common.date.calculate("today");
2382
- await ui5.date.pick(selector, date);
2394
+ await ui5.date.pick(selector, today);
2383
2395
  ```
2384
2396
  <a name="ui5.date.pickRange"></a>
2385
2397
 
@@ -4235,11 +4247,11 @@ Global namespace for non UI5 modules.
4235
4247
 
4236
4248
  * [nonUi5](#nonUi5)
4237
4249
  * [.assertion](#nonUi5.assertion)
4238
- * [.expectAttributeToBe(elem, compareValue, [attribute])](#nonUi5.assertion.expectAttributeToBe)
4239
- * [.expectAttributeToContain(elem, compareValue, [attribute])](#nonUi5.assertion.expectAttributeToContain)
4240
- * [.expectValueToBe(elem, compareValue)](#nonUi5.assertion.expectValueToBe)
4241
- * [.expectToBeVisible(element)](#nonUi5.assertion.expectToBeVisible)
4242
- * [.expectToBeNotVisible(element, [timeout])](#nonUi5.assertion.expectToBeNotVisible)
4250
+ * [.expectAttributeToBe(elementOrSelector, compareValue, [attribute])](#nonUi5.assertion.expectAttributeToBe)
4251
+ * [.expectAttributeToContain(elementOrSelector, compareValue, [attribute])](#nonUi5.assertion.expectAttributeToContain)
4252
+ * [.expectValueToBe(elementOrSelector, compareValue)](#nonUi5.assertion.expectValueToBe)
4253
+ * [.expectToBeVisible(elementOrSelector)](#nonUi5.assertion.expectToBeVisible)
4254
+ * [.expectToBeNotVisible(elementOrSelector, [timeout])](#nonUi5.assertion.expectToBeNotVisible)
4243
4255
  * [.element](#nonUi5.element)
4244
4256
  * [.waitForAll(selector, [timeout])](#nonUi5.element.waitForAll)
4245
4257
  * [.waitToBePresent(selector, [timeout])](#nonUi5.element.waitToBePresent)
@@ -4269,23 +4281,23 @@ Global namespace for non UI5 modules.
4269
4281
  * [.session](#nonUi5.session)
4270
4282
  * [.loginSapNetWeaver(username, password, [clickContinue], [iframeCssSelector])](#nonUi5.session.loginSapNetWeaver)
4271
4283
  * [.userInteraction](#nonUi5.userInteraction)
4272
- * [.click(element, [timeout])](#nonUi5.userInteraction.click)
4273
- * [.clickAndRetry(element, [timeout], [retries], [interval])](#nonUi5.userInteraction.clickAndRetry)
4274
- * [.doubleClick(element, [timeout])](#nonUi5.userInteraction.doubleClick)
4275
- * [.rightClick(element, [timeout])](#nonUi5.userInteraction.rightClick)
4276
- * [.check(element)](#nonUi5.userInteraction.check)
4277
- * [.uncheck(element)](#nonUi5.userInteraction.uncheck)
4278
- * [.fill(element, value)](#nonUi5.userInteraction.fill)
4279
- * [.fillAndRetry(element, value, [retries], [interval])](#nonUi5.userInteraction.fillAndRetry)
4280
- * [.clear(element)](#nonUi5.userInteraction.clear)
4281
- * [.clearAndRetry(element, [retries], [interval])](#nonUi5.userInteraction.clearAndRetry)
4282
- * [.clearAndFill(element, value)](#nonUi5.userInteraction.clearAndFill)
4283
- * [.clearAndFillAndRetry(element, value, [retries], [interval], [verify])](#nonUi5.userInteraction.clearAndFillAndRetry)
4284
- * [.mouseOverElement(element, [xOffset], [yOffset])](#nonUi5.userInteraction.mouseOverElement)
4284
+ * [.click(elementOrSelector, [timeout])](#nonUi5.userInteraction.click)
4285
+ * [.clickAndRetry(elementOrSelector, [timeout], [retries], [interval])](#nonUi5.userInteraction.clickAndRetry)
4286
+ * [.doubleClick(elementOrSelector, [timeout])](#nonUi5.userInteraction.doubleClick)
4287
+ * [.rightClick(elementOrSelector, [timeout])](#nonUi5.userInteraction.rightClick)
4288
+ * [.check(elementOrSelector)](#nonUi5.userInteraction.check)
4289
+ * [.uncheck(elementOrSelector)](#nonUi5.userInteraction.uncheck)
4290
+ * [.fill(elementOrSelector, value)](#nonUi5.userInteraction.fill)
4291
+ * [.fillAndRetry(elementOrSelector, value, [retries], [interval])](#nonUi5.userInteraction.fillAndRetry)
4292
+ * [.clear(elementOrSelector)](#nonUi5.userInteraction.clear)
4293
+ * [.clearAndRetry(elementOrSelector, [retries], [interval])](#nonUi5.userInteraction.clearAndRetry)
4294
+ * [.clearAndFill(elementOrSelector, value)](#nonUi5.userInteraction.clearAndFill)
4295
+ * [.clearAndFillAndRetry(elementOrSelector, value, [retries], [interval], [verify])](#nonUi5.userInteraction.clearAndFillAndRetry)
4296
+ * [.mouseOverElement(elementOrSelector, [xOffset], [yOffset])](#nonUi5.userInteraction.mouseOverElement)
4285
4297
  * [.scrollToElement(elem, [alignment])](#nonUi5.userInteraction.scrollToElement)
4286
- * [.dragAndDrop(element, targetElem)](#nonUi5.userInteraction.dragAndDrop)
4287
- * [.moveCursorAndClick(element)](#nonUi5.userInteraction.moveCursorAndClick)
4288
- * [.clickElementInSvg(svgElem, innerSelector)](#nonUi5.userInteraction.clickElementInSvg)
4298
+ * [.dragAndDrop(elementOrSelector, targetElem)](#nonUi5.userInteraction.dragAndDrop)
4299
+ * [.moveCursorAndClick(elementOrSelector)](#nonUi5.userInteraction.moveCursorAndClick)
4300
+ * [.clickElementInSvg(elementOrSelector, innerSelector)](#nonUi5.userInteraction.clickElementInSvg)
4289
4301
 
4290
4302
  <a name="nonUi5.assertion"></a>
4291
4303
 
@@ -4293,102 +4305,102 @@ Global namespace for non UI5 modules.
4293
4305
  **Kind**: static class of [<code>nonUi5</code>](#nonUi5)
4294
4306
 
4295
4307
  * [.assertion](#nonUi5.assertion)
4296
- * [.expectAttributeToBe(elem, compareValue, [attribute])](#nonUi5.assertion.expectAttributeToBe)
4297
- * [.expectAttributeToContain(elem, compareValue, [attribute])](#nonUi5.assertion.expectAttributeToContain)
4298
- * [.expectValueToBe(elem, compareValue)](#nonUi5.assertion.expectValueToBe)
4299
- * [.expectToBeVisible(element)](#nonUi5.assertion.expectToBeVisible)
4300
- * [.expectToBeNotVisible(element, [timeout])](#nonUi5.assertion.expectToBeNotVisible)
4308
+ * [.expectAttributeToBe(elementOrSelector, compareValue, [attribute])](#nonUi5.assertion.expectAttributeToBe)
4309
+ * [.expectAttributeToContain(elementOrSelector, compareValue, [attribute])](#nonUi5.assertion.expectAttributeToContain)
4310
+ * [.expectValueToBe(elementOrSelector, compareValue)](#nonUi5.assertion.expectValueToBe)
4311
+ * [.expectToBeVisible(elementOrSelector)](#nonUi5.assertion.expectToBeVisible)
4312
+ * [.expectToBeNotVisible(elementOrSelector, [timeout])](#nonUi5.assertion.expectToBeNotVisible)
4301
4313
 
4302
4314
  <a name="nonUi5.assertion.expectAttributeToBe"></a>
4303
4315
 
4304
- #### assertion.expectAttributeToBe(elem, compareValue, [attribute])
4316
+ #### assertion.expectAttributeToBe(elementOrSelector, compareValue, [attribute])
4305
4317
  Expects the attributes value of the passed element to be the compare value.
4306
4318
 
4307
4319
  **Kind**: static method of [<code>assertion</code>](#nonUi5.assertion)
4308
4320
 
4309
4321
  | Param | Type | Description |
4310
4322
  | --- | --- | --- |
4311
- | elem | <code>Object</code> | The element. |
4323
+ | elementOrSelector | <code>Element</code> \| <code>string</code> | The element or CSS selector describing the element. |
4312
4324
  | compareValue | <code>String</code> | The compare value. |
4313
4325
  | [attribute] | <code>String</code> | The attribute to compare. If not passed, it will compare the inner HTML content of the element. |
4314
4326
 
4315
4327
  **Example**
4316
4328
  ```js
4317
- const elem = await nonUi5.element.getById("button01");
4318
- await nonUi5.assertion.expectAttributeToBe(elem, "Save");
4329
+ const element = await nonUi5.element.getById("button01");
4330
+ await nonUi5.assertion.expectAttributeToBe(element, "Save");
4319
4331
  ```
4320
4332
  **Example**
4321
4333
  ```js
4322
- const elem = await nonUi5.element.getById("button01");
4334
+ const element = await nonUi5.element.getById("button01");
4323
4335
  await nonUi5.assertion.expectAttributeToBe(element, "Save", "title");
4324
4336
  ```
4325
4337
  <a name="nonUi5.assertion.expectAttributeToContain"></a>
4326
4338
 
4327
- #### assertion.expectAttributeToContain(elem, compareValue, [attribute])
4339
+ #### assertion.expectAttributeToContain(elementOrSelector, compareValue, [attribute])
4328
4340
  Expects the attributes value of the passed element to contain the compare value.
4329
4341
 
4330
4342
  **Kind**: static method of [<code>assertion</code>](#nonUi5.assertion)
4331
4343
 
4332
4344
  | Param | Type | Description |
4333
4345
  | --- | --- | --- |
4334
- | elem | <code>Object</code> | The element. |
4346
+ | elementOrSelector | <code>Element</code> \| <code>string</code> | The element or CSS selector describing the element. |
4335
4347
  | compareValue | <code>String</code> | The compare value. |
4336
4348
  | [attribute] | <code>String</code> | The attribute to compare. If not passed, it will compare the inner HTML content of the element. |
4337
4349
 
4338
4350
  **Example**
4339
4351
  ```js
4340
- const elem = await nonUi5.element.getById("button01");
4352
+ const element = await nonUi5.element.getById("button01");
4341
4353
  await nonUi5.assertion.expectAttributeToContain(element, "Save", "title");
4342
4354
  ```
4343
4355
  <a name="nonUi5.assertion.expectValueToBe"></a>
4344
4356
 
4345
- #### assertion.expectValueToBe(elem, compareValue)
4357
+ #### assertion.expectValueToBe(elementOrSelector, compareValue)
4346
4358
  Expects the attributes value of the passed element to be the compare value.
4347
4359
 
4348
4360
  **Kind**: static method of [<code>assertion</code>](#nonUi5.assertion)
4349
4361
 
4350
4362
  | Param | Type | Description |
4351
4363
  | --- | --- | --- |
4352
- | elem | <code>Object</code> | The element. |
4364
+ | elementOrSelector | <code>Element</code> \| <code>string</code> | The element or CSS selector describing the element. |
4353
4365
  | compareValue | <code>String</code> | The compare value. |
4354
4366
 
4355
4367
  **Example**
4356
4368
  ```js
4357
- const elem = await nonUi5.element.getById("button01");
4358
- await nonUi5.assertion.expectValueToBe(elem, "Save");
4369
+ const element = await nonUi5.element.getById("button01");
4370
+ await nonUi5.assertion.expectValueToBe(element, "Save");
4359
4371
  ```
4360
4372
  <a name="nonUi5.assertion.expectToBeVisible"></a>
4361
4373
 
4362
- #### assertion.expectToBeVisible(element)
4374
+ #### assertion.expectToBeVisible(elementOrSelector)
4363
4375
  Expects that the element is visible to the user.
4364
4376
 
4365
4377
  **Kind**: static method of [<code>assertion</code>](#nonUi5.assertion)
4366
4378
 
4367
4379
  | Param | Type | Description |
4368
4380
  | --- | --- | --- |
4369
- | element | <code>Object</code> | The element. |
4381
+ | elementOrSelector | <code>Element</code> \| <code>string</code> | The element or CSS selector describing the element. |
4370
4382
 
4371
4383
  **Example**
4372
4384
  ```js
4373
- const elem = await nonUi5.element.getById("button01");
4385
+ const element = await nonUi5.element.getById("button01");
4374
4386
  await nonUi5.assertion.expectToBeVisible(elem);
4375
4387
  ```
4376
4388
  <a name="nonUi5.assertion.expectToBeNotVisible"></a>
4377
4389
 
4378
- #### assertion.expectToBeNotVisible(element, [timeout])
4390
+ #### assertion.expectToBeNotVisible(elementOrSelector, [timeout])
4379
4391
  Expects that the element is not visible to the user.
4380
4392
 
4381
4393
  **Kind**: static method of [<code>assertion</code>](#nonUi5.assertion)
4382
4394
 
4383
4395
  | Param | Type | Default | Description |
4384
4396
  | --- | --- | --- | --- |
4385
- | element | <code>Object</code> | | The element. |
4397
+ | elementOrSelector | <code>Element</code> \| <code>string</code> | | The element or CSS selector describing the element. |
4386
4398
  | [timeout] | <code>Number</code> | <code>30000</code> | The timeout to wait (ms). Recommendation is to lower the timeout since the element is not expected to show up. |
4387
4399
 
4388
4400
  **Example**
4389
4401
  ```js
4390
- const elem = await nonUi5.element.getById("button01");
4391
- await nonUi5.assertion.expectToBeNotVisible(elem, 5000);
4402
+ const element = await nonUi5.element.getById("button01");
4403
+ await nonUi5.assertion.expectToBeNotVisible(element, 5000);
4392
4404
  ```
4393
4405
  <a name="nonUi5.element"></a>
4394
4406
 
@@ -4914,34 +4926,34 @@ await nonUi5.session.loginSapNetWeaver("john", "abc123!");
4914
4926
  **Kind**: static class of [<code>nonUi5</code>](#nonUi5)
4915
4927
 
4916
4928
  * [.userInteraction](#nonUi5.userInteraction)
4917
- * [.click(element, [timeout])](#nonUi5.userInteraction.click)
4918
- * [.clickAndRetry(element, [timeout], [retries], [interval])](#nonUi5.userInteraction.clickAndRetry)
4919
- * [.doubleClick(element, [timeout])](#nonUi5.userInteraction.doubleClick)
4920
- * [.rightClick(element, [timeout])](#nonUi5.userInteraction.rightClick)
4921
- * [.check(element)](#nonUi5.userInteraction.check)
4922
- * [.uncheck(element)](#nonUi5.userInteraction.uncheck)
4923
- * [.fill(element, value)](#nonUi5.userInteraction.fill)
4924
- * [.fillAndRetry(element, value, [retries], [interval])](#nonUi5.userInteraction.fillAndRetry)
4925
- * [.clear(element)](#nonUi5.userInteraction.clear)
4926
- * [.clearAndRetry(element, [retries], [interval])](#nonUi5.userInteraction.clearAndRetry)
4927
- * [.clearAndFill(element, value)](#nonUi5.userInteraction.clearAndFill)
4928
- * [.clearAndFillAndRetry(element, value, [retries], [interval], [verify])](#nonUi5.userInteraction.clearAndFillAndRetry)
4929
- * [.mouseOverElement(element, [xOffset], [yOffset])](#nonUi5.userInteraction.mouseOverElement)
4929
+ * [.click(elementOrSelector, [timeout])](#nonUi5.userInteraction.click)
4930
+ * [.clickAndRetry(elementOrSelector, [timeout], [retries], [interval])](#nonUi5.userInteraction.clickAndRetry)
4931
+ * [.doubleClick(elementOrSelector, [timeout])](#nonUi5.userInteraction.doubleClick)
4932
+ * [.rightClick(elementOrSelector, [timeout])](#nonUi5.userInteraction.rightClick)
4933
+ * [.check(elementOrSelector)](#nonUi5.userInteraction.check)
4934
+ * [.uncheck(elementOrSelector)](#nonUi5.userInteraction.uncheck)
4935
+ * [.fill(elementOrSelector, value)](#nonUi5.userInteraction.fill)
4936
+ * [.fillAndRetry(elementOrSelector, value, [retries], [interval])](#nonUi5.userInteraction.fillAndRetry)
4937
+ * [.clear(elementOrSelector)](#nonUi5.userInteraction.clear)
4938
+ * [.clearAndRetry(elementOrSelector, [retries], [interval])](#nonUi5.userInteraction.clearAndRetry)
4939
+ * [.clearAndFill(elementOrSelector, value)](#nonUi5.userInteraction.clearAndFill)
4940
+ * [.clearAndFillAndRetry(elementOrSelector, value, [retries], [interval], [verify])](#nonUi5.userInteraction.clearAndFillAndRetry)
4941
+ * [.mouseOverElement(elementOrSelector, [xOffset], [yOffset])](#nonUi5.userInteraction.mouseOverElement)
4930
4942
  * [.scrollToElement(elem, [alignment])](#nonUi5.userInteraction.scrollToElement)
4931
- * [.dragAndDrop(element, targetElem)](#nonUi5.userInteraction.dragAndDrop)
4932
- * [.moveCursorAndClick(element)](#nonUi5.userInteraction.moveCursorAndClick)
4933
- * [.clickElementInSvg(svgElem, innerSelector)](#nonUi5.userInteraction.clickElementInSvg)
4943
+ * [.dragAndDrop(elementOrSelector, targetElem)](#nonUi5.userInteraction.dragAndDrop)
4944
+ * [.moveCursorAndClick(elementOrSelector)](#nonUi5.userInteraction.moveCursorAndClick)
4945
+ * [.clickElementInSvg(elementOrSelector, innerSelector)](#nonUi5.userInteraction.clickElementInSvg)
4934
4946
 
4935
4947
  <a name="nonUi5.userInteraction.click"></a>
4936
4948
 
4937
- #### userInteraction.click(element, [timeout])
4949
+ #### userInteraction.click(elementOrSelector, [timeout])
4938
4950
  Clicks on the passed element.
4939
4951
 
4940
4952
  **Kind**: static method of [<code>userInteraction</code>](#nonUi5.userInteraction)
4941
4953
 
4942
4954
  | Param | Type | Default | Description |
4943
4955
  | --- | --- | --- | --- |
4944
- | element | <code>Object</code> | | The element. |
4956
+ | elementOrSelector | <code>Element</code> \| <code>string</code> | | The element or CSS selector describing the element. |
4945
4957
  | [timeout] | <code>Number</code> | <code>30000</code> | The timeout to wait (ms). |
4946
4958
 
4947
4959
  **Example**
@@ -4951,14 +4963,14 @@ await nonUi5.userInteraction.click(elem);
4951
4963
  ```
4952
4964
  <a name="nonUi5.userInteraction.clickAndRetry"></a>
4953
4965
 
4954
- #### userInteraction.clickAndRetry(element, [timeout], [retries], [interval])
4966
+ #### userInteraction.clickAndRetry(elementOrSelector, [timeout], [retries], [interval])
4955
4967
  Clicks on the passed element, retries in case it fails.
4956
4968
 
4957
4969
  **Kind**: static method of [<code>userInteraction</code>](#nonUi5.userInteraction)
4958
4970
 
4959
4971
  | Param | Type | Default | Description |
4960
4972
  | --- | --- | --- | --- |
4961
- | element | <code>Object</code> | | The element. |
4973
+ | elementOrSelector | <code>Element</code> \| <code>string</code> | | The element or CSS selector describing the element. |
4962
4974
  | [timeout] | <code>Number</code> | <code>30000</code> | The timeout to wait (ms). |
4963
4975
  | [retries] | <code>Number</code> | <code>3</code> | The number of retries, can be set in config for all functions under params stepsRetries. |
4964
4976
  | [interval] | <code>Number</code> | <code>5000</code> | The delay between the retries (ms). Can be set in config for all functions under params.stepRetriesIntervals. |
@@ -4970,14 +4982,14 @@ await nonUi5.userInteraction.clickAndRetry(elem);
4970
4982
  ```
4971
4983
  <a name="nonUi5.userInteraction.doubleClick"></a>
4972
4984
 
4973
- #### userInteraction.doubleClick(element, [timeout])
4985
+ #### userInteraction.doubleClick(elementOrSelector, [timeout])
4974
4986
  Double Clicks on the passed element.
4975
4987
 
4976
4988
  **Kind**: static method of [<code>userInteraction</code>](#nonUi5.userInteraction)
4977
4989
 
4978
4990
  | Param | Type | Default | Description |
4979
4991
  | --- | --- | --- | --- |
4980
- | element | <code>Object</code> | | The element. |
4992
+ | elementOrSelector | <code>Element</code> \| <code>string</code> | | The element or CSS selector describing the element. |
4981
4993
  | [timeout] | <code>Number</code> | <code>30000</code> | The timeout to wait (ms). |
4982
4994
 
4983
4995
  **Example**
@@ -4987,14 +4999,14 @@ await nonUi5.userInteraction.doubleClick(elem);
4987
4999
  ```
4988
5000
  <a name="nonUi5.userInteraction.rightClick"></a>
4989
5001
 
4990
- #### userInteraction.rightClick(element, [timeout])
5002
+ #### userInteraction.rightClick(elementOrSelector, [timeout])
4991
5003
  Right Clicks on the passed element.
4992
5004
 
4993
5005
  **Kind**: static method of [<code>userInteraction</code>](#nonUi5.userInteraction)
4994
5006
 
4995
5007
  | Param | Type | Default | Description |
4996
5008
  | --- | --- | --- | --- |
4997
- | element | <code>Object</code> | | The element. |
5009
+ | elementOrSelector | <code>Element</code> \| <code>string</code> | | The element or CSS selector describing the element. |
4998
5010
  | [timeout] | <code>Number</code> | <code>30000</code> | The timeout to wait (ms). |
4999
5011
 
5000
5012
  **Example**
@@ -5004,14 +5016,14 @@ await nonUi5.userInteraction.rightClick(elem);
5004
5016
  ```
5005
5017
  <a name="nonUi5.userInteraction.check"></a>
5006
5018
 
5007
- #### userInteraction.check(element)
5019
+ #### userInteraction.check(elementOrSelector)
5008
5020
  Checks the given checkbox.
5009
5021
 
5010
5022
  **Kind**: static method of [<code>userInteraction</code>](#nonUi5.userInteraction)
5011
5023
 
5012
5024
  | Param | Type | Description |
5013
5025
  | --- | --- | --- |
5014
- | element | <code>Object</code> | The element. |
5026
+ | elementOrSelector | <code>Element</code> \| <code>string</code> | The element or CSS selector describing the element. |
5015
5027
 
5016
5028
  **Example**
5017
5029
  ```js
@@ -5019,14 +5031,14 @@ await nonUi5.userInteraction.check(selector);
5019
5031
  ```
5020
5032
  <a name="nonUi5.userInteraction.uncheck"></a>
5021
5033
 
5022
- #### userInteraction.uncheck(element)
5034
+ #### userInteraction.uncheck(elementOrSelector)
5023
5035
  Unchecks the given checkbox.
5024
5036
 
5025
5037
  **Kind**: static method of [<code>userInteraction</code>](#nonUi5.userInteraction)
5026
5038
 
5027
5039
  | Param | Type | Description |
5028
5040
  | --- | --- | --- |
5029
- | element | <code>Object</code> | The element. |
5041
+ | elementOrSelector | <code>Element</code> \| <code>string</code> | The element or CSS selector describing the element. |
5030
5042
 
5031
5043
  **Example**
5032
5044
  ```js
@@ -5034,14 +5046,14 @@ await nonUi5.userInteraction.uncheck(selector);
5034
5046
  ```
5035
5047
  <a name="nonUi5.userInteraction.fill"></a>
5036
5048
 
5037
- #### userInteraction.fill(element, value)
5049
+ #### userInteraction.fill(elementOrSelector, value)
5038
5050
  Fills the given value into the passed input.
5039
5051
 
5040
5052
  **Kind**: static method of [<code>userInteraction</code>](#nonUi5.userInteraction)
5041
5053
 
5042
5054
  | Param | Type | Description |
5043
5055
  | --- | --- | --- |
5044
- | element | <code>Object</code> | The element. |
5056
+ | elementOrSelector | <code>Element</code> \| <code>string</code> | The element or CSS selector describing the element. |
5045
5057
  | value | <code>String</code> \| <code>Number</code> | The value to enter. |
5046
5058
 
5047
5059
  **Example**
@@ -5051,14 +5063,14 @@ await nonUi5.userInteraction.fill(elem, "Service 01");
5051
5063
  ```
5052
5064
  <a name="nonUi5.userInteraction.fillAndRetry"></a>
5053
5065
 
5054
- #### userInteraction.fillAndRetry(element, value, [retries], [interval])
5066
+ #### userInteraction.fillAndRetry(elementOrSelector, value, [retries], [interval])
5055
5067
  Fills the given value into the passed input, retries in case of a failure.
5056
5068
 
5057
5069
  **Kind**: static method of [<code>userInteraction</code>](#nonUi5.userInteraction)
5058
5070
 
5059
5071
  | Param | Type | Default | Description |
5060
5072
  | --- | --- | --- | --- |
5061
- | element | <code>Object</code> | | The element. |
5073
+ | elementOrSelector | <code>Element</code> \| <code>string</code> | | The element or CSS selector describing the element. |
5062
5074
  | value | <code>String</code> \| <code>Number</code> | | The value to enter. |
5063
5075
  | [retries] | <code>Number</code> | <code>3</code> | The number of retries, can be set in config for all functions under params stepsRetries. |
5064
5076
  | [interval] | <code>Number</code> | <code>5000</code> | The delay between the retries (ms). Can be set in config for all functions under params.stepRetriesIntervals. |
@@ -5070,14 +5082,14 @@ await nonUi5.userInteraction.fillAndRetry(elem, "Service 01");
5070
5082
  ```
5071
5083
  <a name="nonUi5.userInteraction.clear"></a>
5072
5084
 
5073
- #### userInteraction.clear(element)
5085
+ #### userInteraction.clear(elementOrSelector)
5074
5086
  Clears the passed input element.
5075
5087
 
5076
5088
  **Kind**: static method of [<code>userInteraction</code>](#nonUi5.userInteraction)
5077
5089
 
5078
5090
  | Param | Type | Description |
5079
5091
  | --- | --- | --- |
5080
- | element | <code>Object</code> | The element. |
5092
+ | elementOrSelector | <code>Element</code> \| <code>string</code> | The element or CSS selector describing the element. |
5081
5093
 
5082
5094
  **Example**
5083
5095
  ```js
@@ -5086,14 +5098,14 @@ await nonUi5.userInteraction.clear(elem);
5086
5098
  ```
5087
5099
  <a name="nonUi5.userInteraction.clearAndRetry"></a>
5088
5100
 
5089
- #### userInteraction.clearAndRetry(element, [retries], [interval])
5101
+ #### userInteraction.clearAndRetry(elementOrSelector, [retries], [interval])
5090
5102
  Clears the passed input element, retries in case of a failure.
5091
5103
 
5092
5104
  **Kind**: static method of [<code>userInteraction</code>](#nonUi5.userInteraction)
5093
5105
 
5094
5106
  | Param | Type | Default | Description |
5095
5107
  | --- | --- | --- | --- |
5096
- | element | <code>Object</code> | | The element. |
5108
+ | elementOrSelector | <code>Element</code> \| <code>string</code> | | The element or CSS selector describing the element. |
5097
5109
  | [retries] | <code>Number</code> | <code>3</code> | The number of retries, can be set in config for all functions under params stepsRetries. |
5098
5110
  | [interval] | <code>Number</code> | <code>5000</code> | The delay between the retries (ms). Can be set in config for all functions under params.stepRetriesIntervals. |
5099
5111
 
@@ -5104,14 +5116,14 @@ await nonUi5.userInteraction.clearAndRetry(elem);
5104
5116
  ```
5105
5117
  <a name="nonUi5.userInteraction.clearAndFill"></a>
5106
5118
 
5107
- #### userInteraction.clearAndFill(element, value)
5119
+ #### userInteraction.clearAndFill(elementOrSelector, value)
5108
5120
  Clears and fills the passed input element.
5109
5121
 
5110
5122
  **Kind**: static method of [<code>userInteraction</code>](#nonUi5.userInteraction)
5111
5123
 
5112
5124
  | Param | Type | Description |
5113
5125
  | --- | --- | --- |
5114
- | element | <code>Object</code> | The element. |
5126
+ | elementOrSelector | <code>Element</code> \| <code>string</code> | The element or CSS selector describing the element. |
5115
5127
  | value | <code>String</code> \| <code>Number</code> | The value to enter in. |
5116
5128
 
5117
5129
  **Example**
@@ -5121,14 +5133,14 @@ await nonUi5.userInteraction.clearAndFill(elem, "Service 01");
5121
5133
  ```
5122
5134
  <a name="nonUi5.userInteraction.clearAndFillAndRetry"></a>
5123
5135
 
5124
- #### userInteraction.clearAndFillAndRetry(element, value, [retries], [interval], [verify])
5136
+ #### userInteraction.clearAndFillAndRetry(elementOrSelector, value, [retries], [interval], [verify])
5125
5137
  Clears and fills the passed input, retries in case it fails.
5126
5138
 
5127
5139
  **Kind**: static method of [<code>userInteraction</code>](#nonUi5.userInteraction)
5128
5140
 
5129
5141
  | Param | Type | Default | Description |
5130
5142
  | --- | --- | --- | --- |
5131
- | element | <code>Object</code> | | The element. |
5143
+ | elementOrSelector | <code>Element</code> \| <code>string</code> | | The element or CSS selector describing the element. |
5132
5144
  | value | <code>String</code> \| <code>Number</code> | | The value to enter in. |
5133
5145
  | [retries] | <code>Number</code> | <code>3</code> | The number of retries, can be set in config for all functions under params stepsRetries. |
5134
5146
  | [interval] | <code>Number</code> | <code>5000</code> | The delay between the retries (ms). Can be set in config for all functions under params.stepRetriesIntervals. |
@@ -5141,14 +5153,14 @@ await nonUi5.userInteraction.clearAndFillAndRetry(elem, "Service 01");
5141
5153
  ```
5142
5154
  <a name="nonUi5.userInteraction.mouseOverElement"></a>
5143
5155
 
5144
- #### userInteraction.mouseOverElement(element, [xOffset], [yOffset])
5156
+ #### userInteraction.mouseOverElement(elementOrSelector, [xOffset], [yOffset])
5145
5157
  Moves the cursor/focus to the passed element.
5146
5158
 
5147
5159
  **Kind**: static method of [<code>userInteraction</code>](#nonUi5.userInteraction)
5148
5160
 
5149
5161
  | Param | Type | Description |
5150
5162
  | --- | --- | --- |
5151
- | element | <code>Object</code> | The element. |
5163
+ | elementOrSelector | <code>Element</code> \| <code>string</code> | The element or CSS selector describing the element. |
5152
5164
  | [xOffset] | <code>Number</code> | X offset to move to, relative to the top-left corner of the element. If not specified, the mouse will move to the middle of the element. |
5153
5165
  | [yOffset] | <code>Number</code> | Y offset to move to, relative to the top-left corner of the element. If not specified, the mouse will move to the middle of the element. |
5154
5166
 
@@ -5187,14 +5199,14 @@ await nonUi5.userInteraction.scrollToElement(elem, alignment);
5187
5199
  ```
5188
5200
  <a name="nonUi5.userInteraction.dragAndDrop"></a>
5189
5201
 
5190
- #### userInteraction.dragAndDrop(element, targetElem)
5202
+ #### userInteraction.dragAndDrop(elementOrSelector, targetElem)
5191
5203
  Drags and drops the given element to the given target element.
5192
5204
 
5193
5205
  **Kind**: static method of [<code>userInteraction</code>](#nonUi5.userInteraction)
5194
5206
 
5195
5207
  | Param | Type | Description |
5196
5208
  | --- | --- | --- |
5197
- | element | <code>Object</code> | The element to drag. |
5209
+ | elementOrSelector | <code>Element</code> \| <code>string</code> | The element or CSS selector describing the element. |
5198
5210
  | targetElem | <code>Object</code> | The target element to drop the element. |
5199
5211
 
5200
5212
  **Example**
@@ -5208,14 +5220,14 @@ await nonUi5.userInteraction.dragAndDrop(elem, targetElem);
5208
5220
  ```
5209
5221
  <a name="nonUi5.userInteraction.moveCursorAndClick"></a>
5210
5222
 
5211
- #### userInteraction.moveCursorAndClick(element)
5223
+ #### userInteraction.moveCursorAndClick(elementOrSelector)
5212
5224
  Moves the cursor to the target element and clicks on it. Can be used for charts.
5213
5225
 
5214
5226
  **Kind**: static method of [<code>userInteraction</code>](#nonUi5.userInteraction)
5215
5227
 
5216
5228
  | Param | Type | Description |
5217
5229
  | --- | --- | --- |
5218
- | element | <code>Object</code> | The element to be clicked. |
5230
+ | elementOrSelector | <code>Element</code> \| <code>string</code> | The element or CSS selector describing the element. |
5219
5231
 
5220
5232
  **Example**
5221
5233
  ```js
@@ -5224,14 +5236,14 @@ await nonUi5.userInteraction.moveCursorAndClick(elem);
5224
5236
  ```
5225
5237
  <a name="nonUi5.userInteraction.clickElementInSvg"></a>
5226
5238
 
5227
- #### userInteraction.clickElementInSvg(svgElem, innerSelector)
5239
+ #### userInteraction.clickElementInSvg(elementOrSelector, innerSelector)
5228
5240
  Clicks on an inner element within a SVG element.
5229
5241
 
5230
5242
  **Kind**: static method of [<code>userInteraction</code>](#nonUi5.userInteraction)
5231
5243
 
5232
5244
  | Param | Type | Description |
5233
5245
  | --- | --- | --- |
5234
- | svgElem | <code>Object</code> | The SVG element. |
5246
+ | elementOrSelector | <code>Object</code> \| <code>string</code> | The SVG element or CSS selector describing the element. |
5235
5247
  | innerSelector | <code>String</code> | The CSS selector describing the inner element to be clicked. |
5236
5248
 
5237
5249
  **Example**
@@ -5249,14 +5261,14 @@ Global namespace for service modules.
5249
5261
 
5250
5262
  * [service](#service)
5251
5263
  * [.odata](#service.odata)
5252
- * [.init(url, username, password, [loggingEnabled], [params], [authType])](#service.odata.init) ⇒ <code>Object</code>
5253
- * [.get(srv, entitySet, keys, raw)](#service.odata.get)
5254
- * [.getEntitySet(srv, entitySet, [filterString], [selectionFields], [queryParams])](#service.odata.getEntitySet) ⇒ <code>Array</code>
5255
- * [.isFeatureToggleActivated(srv, featureName)](#service.odata.isFeatureToggleActivated)
5256
- * [.post(srv, entitySet, payload, raw)](#service.odata.post)
5257
- * [.merge(srv, entitySet, payload)](#service.odata.merge)
5258
- * [.delete(srv, entitySet, options)](#service.odata.delete)
5259
- * [.callFunctionImport(srv, functionImportName, options)](#service.odata.callFunctionImport)
5264
+ * [.init(url, username, password, [loggingEnabled], [params], [authType], [headers])](#service.odata.init) ⇒ <code>Object</code>
5265
+ * [.get(srv, entitySet, keys, [raw], [headers])](#service.odata.get) ⇒ <code>Promise</code>
5266
+ * [.getEntitySet(srv, entitySet, [filterString], [selectionFields], [queryParams])](#service.odata.getEntitySet) ⇒ <code>Promise</code>
5267
+ * [.post(srv, entitySet, payload, [raw], [headers])](#service.odata.post) ⇒ <code>Promise</code>
5268
+ * [.merge(srv, entitySet, payload, [headers])](#service.odata.merge) ⇒ <code>Promise</code>
5269
+ * [.delete(srv, entitySet, options, [headers])](#service.odata.delete) ⇒ <code>Promise</code>
5270
+ * [.callFunctionImport(srv, functionImportName, options)](#service.odata.callFunctionImport) ⇒ <code>Promise</code>
5271
+ * [.isFeatureToggleActivated(srv, featureName)](#service.odata.isFeatureToggleActivated) ⇒ <code>Promise</code>
5260
5272
  * [.getOutputManagementPdfStream(outputConf, url, username, password)](#service.odata.getOutputManagementPdfStream)
5261
5273
  * [.readPdfFromDirectUrl(url, [username], [password], [isSaml])](#service.odata.readPdfFromDirectUrl)
5262
5274
  * [.rest](#service.rest)
@@ -5273,21 +5285,21 @@ Global namespace for service modules.
5273
5285
  **Kind**: static class of [<code>service</code>](#service)
5274
5286
 
5275
5287
  * [.odata](#service.odata)
5276
- * [.init(url, username, password, [loggingEnabled], [params], [authType])](#service.odata.init) ⇒ <code>Object</code>
5277
- * [.get(srv, entitySet, keys, raw)](#service.odata.get)
5278
- * [.getEntitySet(srv, entitySet, [filterString], [selectionFields], [queryParams])](#service.odata.getEntitySet) ⇒ <code>Array</code>
5279
- * [.isFeatureToggleActivated(srv, featureName)](#service.odata.isFeatureToggleActivated)
5280
- * [.post(srv, entitySet, payload, raw)](#service.odata.post)
5281
- * [.merge(srv, entitySet, payload)](#service.odata.merge)
5282
- * [.delete(srv, entitySet, options)](#service.odata.delete)
5283
- * [.callFunctionImport(srv, functionImportName, options)](#service.odata.callFunctionImport)
5288
+ * [.init(url, username, password, [loggingEnabled], [params], [authType], [headers])](#service.odata.init) ⇒ <code>Object</code>
5289
+ * [.get(srv, entitySet, keys, [raw], [headers])](#service.odata.get) ⇒ <code>Promise</code>
5290
+ * [.getEntitySet(srv, entitySet, [filterString], [selectionFields], [queryParams])](#service.odata.getEntitySet) ⇒ <code>Promise</code>
5291
+ * [.post(srv, entitySet, payload, [raw], [headers])](#service.odata.post) ⇒ <code>Promise</code>
5292
+ * [.merge(srv, entitySet, payload, [headers])](#service.odata.merge) ⇒ <code>Promise</code>
5293
+ * [.delete(srv, entitySet, options, [headers])](#service.odata.delete) ⇒ <code>Promise</code>
5294
+ * [.callFunctionImport(srv, functionImportName, options)](#service.odata.callFunctionImport) ⇒ <code>Promise</code>
5295
+ * [.isFeatureToggleActivated(srv, featureName)](#service.odata.isFeatureToggleActivated) ⇒ <code>Promise</code>
5284
5296
  * [.getOutputManagementPdfStream(outputConf, url, username, password)](#service.odata.getOutputManagementPdfStream)
5285
5297
  * [.readPdfFromDirectUrl(url, [username], [password], [isSaml])](#service.odata.readPdfFromDirectUrl)
5286
5298
 
5287
5299
  <a name="service.odata.init"></a>
5288
5300
 
5289
- #### odata.init(url, username, password, [loggingEnabled], [params], [authType]) ⇒ <code>Object</code>
5290
- Initializes The service to work with.
5301
+ #### odata.init(url, username, password, [loggingEnabled], [params], [authType], [headers]) ⇒ <code>Object</code>
5302
+ Initializes the OData Service.
5291
5303
  XCSRF-Token will be automatically fetched and stored in the service instance.
5292
5304
  Cookies will also automatically assembled and stored in the service instance.
5293
5305
 
@@ -5296,12 +5308,13 @@ Cookies will also automatically assembled and stored in the service instance.
5296
5308
 
5297
5309
  | Param | Type | Default | Description |
5298
5310
  | --- | --- | --- | --- |
5299
- | url | <code>String</code> | | The base url of the service |
5300
- | username | <code>String</code> | | The username. |
5311
+ | url | <code>String</code> | | The base url of the service. |
5312
+ | username | <code>String</code> | | The username to authenticate the service. |
5301
5313
  | password | <code>String</code> | | The password of the username. |
5302
- | [loggingEnabled] | <code>boolean</code> | <code>false</code> | The boolean param to control whether user wants to see logs during build run |
5303
- | [params] | <code>Object</code> | <code>{}</code> | JSON object with key-value pairs of parameter names and corresponding values by default we send { "client": "715", "documentation": ["heading", "quickinfo"], "language": "EN" } These can be overridden by sending params as JSON object with additional params as shown in example |
5314
+ | [loggingEnabled] | <code>Boolean</code> | <code>false</code> | The boolean param to control whether user wants to see logs during build run. |
5315
+ | [params] | <code>Object</code> | <code>{}</code> | JSON object with key-value pairs of parameter names and corresponding values. By default we send { "client": "715", "documentation": ["heading", "quickinfo"], "language": "EN" } These can be overridden by sending params as JSON object with additional params as shown in example. |
5304
5316
  | [authType] | <code>String</code> | | authentication type, in case you want to override the default SAML authentication. Set this to "basic", to use basic authentication for communication users for whom SAML login doesn't work. Or "none" for no authentication. |
5317
+ | [headers] | <code>Object</code> | | JSON object with key-value pairs of optional headers. |
5305
5318
 
5306
5319
  **Example**
5307
5320
  ```js
@@ -5310,26 +5323,38 @@ const params = {
5310
5323
  "saml2": "disabled",
5311
5324
  "language": "de"
5312
5325
  }
5313
- srv = await service.odata.init(url, user, password, false, params);
5326
+ const srv = await service.odata.init(url, user, password, false, params);
5327
+ ```
5328
+ **Example**
5329
+ ```js
5330
+ const base64Credentials = Buffer.from(`${user}:${password}`).toString("base64");
5331
+ const authHeaders = {
5332
+ "Authorization": `Basic ${base64Credentials}`,
5333
+ "DwC-Tenant": tenant
5334
+ };
5335
+
5336
+ const srv = await service.odata.init(url, user, password, true, params, "headers", authHeaders);
5314
5337
  ```
5315
5338
  <a name="service.odata.get"></a>
5316
5339
 
5317
- #### odata.get(srv, entitySet, keys, raw)
5318
- makes a GET request.
5340
+ #### odata.get(srv, entitySet, keys, [raw], [headers]) ⇒ <code>Promise</code>
5341
+ Sends a GET request to retrieve data from the specified OData entity set.
5319
5342
 
5320
5343
  **Kind**: static method of [<code>odata</code>](#service.odata)
5344
+ **Returns**: <code>Promise</code> - A Promise that resolves to the response data.
5321
5345
 
5322
- | Param | Type | Description |
5323
- | --- | --- | --- |
5324
- | srv | <code>Object</code> | Instance of the service |
5325
- | entitySet | <code>String</code> | The entitySet you want to GET from. |
5326
- | keys | <code>Object</code> | The required keys for the GET-request. |
5327
- | raw | <code>Boolean</code> | Response includes all header contents. |
5346
+ | Param | Type | Default | Description |
5347
+ | --- | --- | --- | --- |
5348
+ | srv | <code>Object</code> | | An instance of the service. |
5349
+ | entitySet | <code>String</code> | | The entity set from which data is to be retrieved. |
5350
+ | keys | <code>Object</code> | | The required keys for the GET request. |
5351
+ | [raw] | <code>Boolean</code> | <code>false</code> | Specifies whether the response should include all header contents. |
5352
+ | [headers] | <code>Object</code> | | Optional headers to be included in the request. |
5328
5353
 
5329
5354
  **Example**
5330
5355
  ```js
5331
5356
  const url = "<baseUrl>/sap/opu/odata/sap/API_PURCHASEORDER_PROCESS_SRV/";
5332
- srv = await service.odata.init(url, user, password);
5357
+ const srv = await service.odata.init(url, user, password);
5333
5358
  const keys = {
5334
5359
  PurchaseOrder: "4100000000"
5335
5360
  };
@@ -5337,11 +5362,11 @@ const res = await service.odata.get(srv, "A_PurchaseOrder", keys);
5337
5362
  ```
5338
5363
  <a name="service.odata.getEntitySet"></a>
5339
5364
 
5340
- #### odata.getEntitySet(srv, entitySet, [filterString], [selectionFields], [queryParams]) ⇒ <code>Array</code>
5365
+ #### odata.getEntitySet(srv, entitySet, [filterString], [selectionFields], [queryParams]) ⇒ <code>Promise</code>
5341
5366
  GET's the EntitySet collection.
5342
5367
 
5343
5368
  **Kind**: static method of [<code>odata</code>](#service.odata)
5344
- **Returns**: <code>Array</code> - - Result set array
5369
+ **Returns**: <code>Promise</code> - A Promise that resolves to the response data.
5345
5370
 
5346
5371
  | Param | Type | Description |
5347
5372
  | --- | --- | --- |
@@ -5368,63 +5393,49 @@ let queryParams = {
5368
5393
  };
5369
5394
  let res = await service.odata.getEntitySet(srv, "A_PurchaseOrder", filterString, select, queryParams);
5370
5395
  ```
5371
- <a name="service.odata.isFeatureToggleActivated"></a>
5372
-
5373
- #### odata.isFeatureToggleActivated(srv, featureName)
5374
- checks if a feature toggle is switched on or off
5375
-
5376
- **Kind**: static method of [<code>odata</code>](#service.odata)
5377
-
5378
- | Param | Type | Description |
5379
- | --- | --- | --- |
5380
- | srv | <code>Object</code> | Instance of the service |
5381
- | featureName | <code>String</code> | The name of the feature you want know the status of. |
5382
-
5383
- **Example**
5384
- ```js
5385
- const url = browser.params.systemUrl + "/sap/opu/odata/SAP/CA_FM_FEATURE_TOGGLE_STATUS_SRV/";
5386
- const srv = await service.odata.init(url, user, password);
5387
- let isFeatureActive = await service.odata.isFeatureToggleActivated(srv, "MM_PUR_PO_BATCHES_IN_MANAGE_PO");
5388
- ```
5389
5396
  <a name="service.odata.post"></a>
5390
5397
 
5391
- #### odata.post(srv, entitySet, payload, raw)
5392
- makes a POST request.
5398
+ #### odata.post(srv, entitySet, payload, [raw], [headers]) ⇒ <code>Promise</code>
5399
+ Sends a POST request to retrieve data from the specified OData entity set for the given payload.
5393
5400
 
5394
5401
  **Kind**: static method of [<code>odata</code>](#service.odata)
5402
+ **Returns**: <code>Promise</code> - A Promise that resolves to the response data.
5395
5403
 
5396
- | Param | Type | Description |
5397
- | --- | --- | --- |
5398
- | srv | <code>Object</code> | Instance of the service |
5399
- | entitySet | <code>String</code> | The entitySet you want to POST against. |
5400
- | payload | <code>Object</code> | The payload for the POST-request. |
5401
- | raw | <code>Boolean</code> | Response includes all header contents. |
5404
+ | Param | Type | Default | Description |
5405
+ | --- | --- | --- | --- |
5406
+ | srv | <code>Object</code> | | Instance of the service |
5407
+ | entitySet | <code>String</code> | | The entitySet you want to POST against. |
5408
+ | payload | <code>Object</code> | | The payload of the POST request. |
5409
+ | [raw] | <code>Boolean</code> | <code>false</code> | Specifies whether the response should include all header contents. |
5410
+ | [headers] | <code>Object</code> | | Optional headers to be included in the request. |
5402
5411
 
5403
5412
  **Example**
5404
5413
  ```js
5405
- let payload = {
5414
+ const payload = {
5406
5415
  "PurchaseOrder": "4500007108",
5407
5416
  "DraftUUID": "00000000-0000-0000-0000-000000000000",
5408
5417
  "IsActiveEntity": "true"
5409
5418
  };
5410
- let res = await service.odata.post(srv, "A_PurchaseOrder", payload);
5419
+ const res = await service.odata.post(srv, "A_PurchaseOrder", payload);
5411
5420
  ```
5412
5421
  <a name="service.odata.merge"></a>
5413
5422
 
5414
- #### odata.merge(srv, entitySet, payload)
5415
- makes a MERGE request.
5423
+ #### odata.merge(srv, entitySet, payload, [headers]) ⇒ <code>Promise</code>
5424
+ @description Sends a MERGE request to merge data from the specified OData entity set for the given payload.
5416
5425
 
5417
5426
  **Kind**: static method of [<code>odata</code>](#service.odata)
5427
+ **Returns**: <code>Promise</code> - A Promise that resolves to the response data.
5418
5428
 
5419
5429
  | Param | Type | Description |
5420
5430
  | --- | --- | --- |
5421
5431
  | srv | <code>Object</code> | Instance of the service |
5422
5432
  | entitySet | <code>String</code> | The entitySet you want to MERGE in. |
5423
- | payload | <code>Object</code> | The payload for the MERGE-request. |
5433
+ | payload | <code>Object</code> | The payload of the MERGE request. |
5434
+ | [headers] | <code>Object</code> | Optional headers to be included in the request. |
5424
5435
 
5425
5436
  **Example**
5426
5437
  ```js
5427
- let res = await service.odata.merge(srv, "A_PurchaseOrderScheduleLine", {
5438
+ const res = await service.odata.merge(srv, "A_PurchaseOrderScheduleLine", {
5428
5439
  "PurchasingDocument": "4500007108",
5429
5440
  "PurchasingDocumentItem": "10",
5430
5441
  "ScheduleLine": "1",
@@ -5433,38 +5444,41 @@ let res = await service.odata.merge(srv, "A_PurchaseOrderScheduleLine", {
5433
5444
  ```
5434
5445
  <a name="service.odata.delete"></a>
5435
5446
 
5436
- #### odata.delete(srv, entitySet, options)
5437
- makes a DELETE request.
5447
+ #### odata.delete(srv, entitySet, options, [headers]) ⇒ <code>Promise</code>
5448
+ Sends a DELETE request to the specified OData entity set.
5438
5449
 
5439
5450
  **Kind**: static method of [<code>odata</code>](#service.odata)
5451
+ **Returns**: <code>Promise</code> - A Promise that resolves to the response data.
5440
5452
 
5441
5453
  | Param | Type | Description |
5442
5454
  | --- | --- | --- |
5443
- | srv | <code>Object</code> | Instance of the service |
5455
+ | srv | <code>Object</code> | Instance of the service. |
5444
5456
  | entitySet | <code>String</code> | The entitySet you want to DELETE. |
5445
- | options | <code>Object</code> | The options for the DELETE-request. |
5457
+ | options | <code>Object</code> | The options for the DELETE request. |
5458
+ | [headers] | <code>Object</code> | Optional headers to be included in the request. |
5446
5459
 
5447
5460
  **Example**
5448
5461
  ```js
5449
- let options = {
5462
+ const options = {
5450
5463
  "PurchaseOrder": "",
5451
5464
  "DraftUUID": draftUUID,
5452
5465
  "IsActiveEntity": false
5453
5466
  };
5454
- await service.odata.delete(srv, "C_PurchaseOrderTP", options);
5467
+ const res = await service.odata.delete(srv, "C_PurchaseOrderTP", options);
5455
5468
  ```
5456
5469
  <a name="service.odata.callFunctionImport"></a>
5457
5470
 
5458
- #### odata.callFunctionImport(srv, functionImportName, options)
5459
- makes a function import request on an OData service.
5471
+ #### odata.callFunctionImport(srv, functionImportName, options) ⇒ <code>Promise</code>
5472
+ Sends a function import request to the OData service instance.
5460
5473
 
5461
5474
  **Kind**: static method of [<code>odata</code>](#service.odata)
5475
+ **Returns**: <code>Promise</code> - A Promise that resolves to the response data.
5462
5476
 
5463
5477
  | Param | Type | Description |
5464
5478
  | --- | --- | --- |
5465
- | srv | <code>Object</code> | Instance of the service |
5466
- | functionImportName | <code>String</code> | Name of Function Import |
5467
- | options | <code>Object</code> | parameters for function import |
5479
+ | srv | <code>Object</code> | Instance of the service. |
5480
+ | functionImportName | <code>String</code> | Name of Function Import. |
5481
+ | options | <code>Object</code> | Parameters for function import. |
5468
5482
 
5469
5483
  **Example**
5470
5484
  ```js
@@ -5474,6 +5488,25 @@ const options = {
5474
5488
  };
5475
5489
  const res = await service.odata.callFunctionImport(srv, "Cancel", options);
5476
5490
  ```
5491
+ <a name="service.odata.isFeatureToggleActivated"></a>
5492
+
5493
+ #### odata.isFeatureToggleActivated(srv, featureName) ⇒ <code>Promise</code>
5494
+ Checks if a feature toggle is switched on or off.
5495
+
5496
+ **Kind**: static method of [<code>odata</code>](#service.odata)
5497
+ **Returns**: <code>Promise</code> - A Promise that resolves to a bool value.
5498
+
5499
+ | Param | Type | Description |
5500
+ | --- | --- | --- |
5501
+ | srv | <code>Object</code> | Instance of the service |
5502
+ | featureName | <code>String</code> | The name of the feature you want know the status of. |
5503
+
5504
+ **Example**
5505
+ ```js
5506
+ const url = browser.params.systemUrl + "/sap/opu/odata/SAP/CA_FM_FEATURE_TOGGLE_STATUS_SRV/";
5507
+ const srv = await service.odata.init(url, user, password);
5508
+ let isFeatureActive = await service.odata.isFeatureToggleActivated(srv, "MM_PUR_PO_BATCHES_IN_MANAGE_PO");
5509
+ ```
5477
5510
  <a name="service.odata.getOutputManagementPdfStream"></a>
5478
5511
 
5479
5512
  #### odata.getOutputManagementPdfStream(outputConf, url, username, password)