@sap_oss/wdio-qmate-service 2.1.1 → 2.2.1

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.
Files changed (34) hide show
  1. package/docs/doc.md +118 -28
  2. package/docs/index.md +2 -3
  3. package/lib/reuse/modules/common/userInteraction.d.ts +3 -3
  4. package/lib/reuse/modules/common/userInteraction.js +19 -18
  5. package/lib/reuse/modules/common/userInteraction.js.map +1 -1
  6. package/lib/reuse/modules/nonUi5/element.d.ts +11 -1
  7. package/lib/reuse/modules/nonUi5/element.js +14 -1
  8. package/lib/reuse/modules/nonUi5/element.js.map +1 -1
  9. package/lib/reuse/modules/nonUi5/userInteraction.d.ts +30 -11
  10. package/lib/reuse/modules/nonUi5/userInteraction.js +251 -155
  11. package/lib/reuse/modules/nonUi5/userInteraction.js.map +1 -1
  12. package/lib/reuse/modules/ui5/userInteraction.d.ts +41 -21
  13. package/lib/reuse/modules/ui5/userInteraction.js +95 -45
  14. package/lib/reuse/modules/ui5/userInteraction.js.map +1 -1
  15. package/package.json +1 -1
  16. package/test/helper/website/checkBox.html +9 -1
  17. package/test/reuse/nonUi5/userInteraction/check.spec.js +44 -0
  18. package/test/reuse/nonUi5/userInteraction/clear.spec.js +4 -4
  19. package/test/reuse/nonUi5/userInteraction/clearAndFill.spec.js +22 -18
  20. package/test/reuse/nonUi5/userInteraction/clearAndFillAndRetry.spec.js +11 -13
  21. package/test/reuse/nonUi5/userInteraction/clearAndRetry.spec.js +5 -4
  22. package/test/reuse/nonUi5/userInteraction/click.spec.js +7 -9
  23. package/test/reuse/nonUi5/userInteraction/clickAndRetry.spec.js +8 -9
  24. package/test/reuse/nonUi5/userInteraction/fill.spec.js +5 -5
  25. package/test/reuse/nonUi5/userInteraction/fillAndRetry.spec.js +8 -9
  26. package/test/reuse/nonUi5/userInteraction/mouseOverElement.spec.js +8 -13
  27. package/test/reuse/nonUi5/userInteraction/moveCursorAndClick.spec.js +4 -6
  28. package/test/reuse/nonUi5/userInteraction/scrollToElement.spec.js +2 -4
  29. package/test/reuse/nonUi5/userInteraction/test.userInteraction.conf.js +46 -40
  30. package/test/reuse/nonUi5/userInteraction/uncheck.spec.js +44 -0
  31. package/test/reuse/ui5/userInteraction/check.spec.js +66 -0
  32. package/test/reuse/ui5/userInteraction/test.userInteraction.conf.js +3 -1
  33. package/test/reuse/ui5/userInteraction/test.userInteraction.sauceLab.conf.js +5 -4
  34. package/test/reuse/ui5/userInteraction/uncheck.spec.js +66 -0
package/docs/doc.md CHANGED
@@ -390,7 +390,7 @@ Fills the active input with the given value.
390
390
 
391
391
  | Param | Type | Description |
392
392
  | --- | --- | --- |
393
- | value | <code>String</code> | The value with witch the input should be filled. |
393
+ | value | <code>String</code> \| <code>Number</code> | The value to enter. |
394
394
 
395
395
  **Example**
396
396
  ```js
@@ -405,7 +405,7 @@ Enters the given value to the active input field and retries the action in case
405
405
 
406
406
  | Param | Type | Default | Description |
407
407
  | --- | --- | --- | --- |
408
- | value | <code>String</code> | | The value with witch the input should be filled. |
408
+ | value | <code>String</code> | | The value to enter. |
409
409
  | [retries] | <code>Number</code> | <code>3</code> | The number of retries, can be set in config for all functions under params stepsRetries. |
410
410
  | [interval] | <code>Number</code> | <code>5000</code> | The delay between the retries (ms). Can be set in config for all functions under params.stepRetriesIntervals. |
411
411
 
@@ -1598,8 +1598,9 @@ Global namespace for UI5 modules.
1598
1598
  * [.doubleClick(selector, [index], [timeout])](#ui5.userInteraction.doubleClick)
1599
1599
  * [.rightClick(selector, [index], [timeout])](#ui5.userInteraction.rightClick)
1600
1600
  * [.clickTab(selector, [index], [timeout])](#ui5.userInteraction.clickTab)
1601
- * [.selectFromTab(selector, value, [index], [timeout])](#ui5.userInteraction.selectFromTab)
1602
1601
  * [.clickListItem(selector, [index], [timeout])](#ui5.userInteraction.clickListItem)
1602
+ * [.check(selector, [index], [timeout])](#ui5.userInteraction.check)
1603
+ * [.uncheck(selector, [index], [timeout])](#ui5.userInteraction.uncheck)
1603
1604
  * [.fill(selector, value, [index], [timeout])](#ui5.userInteraction.fill)
1604
1605
  * [.fillAndRetry(selector, value, [index], [timeout], [retries], [interval])](#ui5.userInteraction.fillAndRetry)
1605
1606
  * [.clear(selector, [index], [timeout])](#ui5.userInteraction.clear)
@@ -1614,6 +1615,7 @@ Global namespace for UI5 modules.
1614
1615
  * [.selectMultiComboBox(selector, values, [index])](#ui5.userInteraction.selectMultiComboBox)
1615
1616
  * [.clickSelectArrow(selector, [index])](#ui5.userInteraction.clickSelectArrow)
1616
1617
  * [.clickSelectArrowAndRetry(selector, [index], [retries], [interval])](#ui5.userInteraction.clickSelectArrowAndRetry)
1618
+ * [.selectFromTab(selector, value, [index], [timeout])](#ui5.userInteraction.selectFromTab)
1617
1619
  * [.mouseOverElement(selector, [index], [timeout])](#ui5.userInteraction.mouseOverElement)
1618
1620
  * [.scrollToElement(selector, [index], [alignment], [timeout])](#ui5.userInteraction.scrollToElement)
1619
1621
  * [.selectAll([selector], [index], [timeout])](#ui5.userInteraction.selectAll)
@@ -3495,8 +3497,9 @@ await ui5.table.clickSettingsButton(glAccountItemsTable);
3495
3497
  * [.doubleClick(selector, [index], [timeout])](#ui5.userInteraction.doubleClick)
3496
3498
  * [.rightClick(selector, [index], [timeout])](#ui5.userInteraction.rightClick)
3497
3499
  * [.clickTab(selector, [index], [timeout])](#ui5.userInteraction.clickTab)
3498
- * [.selectFromTab(selector, value, [index], [timeout])](#ui5.userInteraction.selectFromTab)
3499
3500
  * [.clickListItem(selector, [index], [timeout])](#ui5.userInteraction.clickListItem)
3501
+ * [.check(selector, [index], [timeout])](#ui5.userInteraction.check)
3502
+ * [.uncheck(selector, [index], [timeout])](#ui5.userInteraction.uncheck)
3500
3503
  * [.fill(selector, value, [index], [timeout])](#ui5.userInteraction.fill)
3501
3504
  * [.fillAndRetry(selector, value, [index], [timeout], [retries], [interval])](#ui5.userInteraction.fillAndRetry)
3502
3505
  * [.clear(selector, [index], [timeout])](#ui5.userInteraction.clear)
@@ -3511,6 +3514,7 @@ await ui5.table.clickSettingsButton(glAccountItemsTable);
3511
3514
  * [.selectMultiComboBox(selector, values, [index])](#ui5.userInteraction.selectMultiComboBox)
3512
3515
  * [.clickSelectArrow(selector, [index])](#ui5.userInteraction.clickSelectArrow)
3513
3516
  * [.clickSelectArrowAndRetry(selector, [index], [retries], [interval])](#ui5.userInteraction.clickSelectArrowAndRetry)
3517
+ * [.selectFromTab(selector, value, [index], [timeout])](#ui5.userInteraction.selectFromTab)
3514
3518
  * [.mouseOverElement(selector, [index], [timeout])](#ui5.userInteraction.mouseOverElement)
3515
3519
  * [.scrollToElement(selector, [index], [alignment], [timeout])](#ui5.userInteraction.scrollToElement)
3516
3520
  * [.selectAll([selector], [index], [timeout])](#ui5.userInteraction.selectAll)
@@ -3607,31 +3611,29 @@ The function retries the click for maximal 3 times if the selection of the tab (
3607
3611
  ```js
3608
3612
  await ui5.userInteraction.clickTab(selector);
3609
3613
  ```
3610
- <a name="ui5.userInteraction.selectFromTab"></a>
3614
+ <a name="ui5.userInteraction.clickListItem"></a>
3611
3615
 
3612
- #### userInteraction.selectFromTab(selector, value, [index], [timeout])
3613
- Selects the passed value on the tab with the given selector and checks if the tab got selected successfully.
3614
- The function retries the click for maximal 3 times if the selection of the tab (blue underline) was not successful.
3616
+ #### userInteraction.clickListItem(selector, [index], [timeout])
3617
+ Clicks or opens the list item with the given selector (e.g. ColumnListItem, StandardListItem).
3618
+ In some cases the default click function is not working correctly (clicks an element within the list item).
3619
+ Therefore we recommend to use this function to open a specific list item.
3615
3620
 
3616
3621
  **Kind**: static method of [<code>userInteraction</code>](#ui5.userInteraction)
3617
3622
 
3618
3623
  | Param | Type | Default | Description |
3619
3624
  | --- | --- | --- | --- |
3620
3625
  | selector | <code>Object</code> | | The selector describing the element. |
3621
- | value | <code>String</code> | | The value to select. |
3622
3626
  | [index] | <code>Number</code> | <code>0</code> | The index of the selector (in case there are more than one elements visible at the same time). |
3623
3627
  | [timeout] | <code>Number</code> | <code>30000</code> | The timeout to wait (ms). |
3624
3628
 
3625
3629
  **Example**
3626
3630
  ```js
3627
- await ui5.userInteraction.selectFromTab(selector);
3631
+ await ui5.userInteraction.clickListItem(selector);
3628
3632
  ```
3629
- <a name="ui5.userInteraction.clickListItem"></a>
3633
+ <a name="ui5.userInteraction.check"></a>
3630
3634
 
3631
- #### userInteraction.clickListItem(selector, [index], [timeout])
3632
- Clicks or opens the list item with the given selector (e.g. ColumnListItem, StandardListItem).
3633
- In some cases the default click function is not working correctly (clicks an element within the list item).
3634
- Therefore we recommend to use this function to open a specific list item.
3635
+ #### userInteraction.check(selector, [index], [timeout])
3636
+ Checks the checkbox with the given selector.
3635
3637
 
3636
3638
  **Kind**: static method of [<code>userInteraction</code>](#ui5.userInteraction)
3637
3639
 
@@ -3643,7 +3645,24 @@ Therefore we recommend to use this function to open a specific list item.
3643
3645
 
3644
3646
  **Example**
3645
3647
  ```js
3646
- await ui5.userInteraction.clickListItem(selector);
3648
+ await ui5.userInteraction.check(selector);
3649
+ ```
3650
+ <a name="ui5.userInteraction.uncheck"></a>
3651
+
3652
+ #### userInteraction.uncheck(selector, [index], [timeout])
3653
+ Unchecks the checkbox with the given selector.
3654
+
3655
+ **Kind**: static method of [<code>userInteraction</code>](#ui5.userInteraction)
3656
+
3657
+ | Param | Type | Default | Description |
3658
+ | --- | --- | --- | --- |
3659
+ | selector | <code>Object</code> | | The selector describing the element. |
3660
+ | [index] | <code>Number</code> | <code>0</code> | The index of the selector (in case there are more than one elements visible at the same time). |
3661
+ | [timeout] | <code>Number</code> | <code>30000</code> | The timeout to wait (ms). |
3662
+
3663
+ **Example**
3664
+ ```js
3665
+ await ui5.userInteraction.uncheck(selector);
3647
3666
  ```
3648
3667
  <a name="ui5.userInteraction.fill"></a>
3649
3668
 
@@ -3655,7 +3674,7 @@ Fills the input field with the given selector.
3655
3674
  | Param | Type | Default | Description |
3656
3675
  | --- | --- | --- | --- |
3657
3676
  | selector | <code>Object</code> | | The selector describing the element. |
3658
- | value | <code>String</code> | | The value to fill. |
3677
+ | value | <code>String</code> \| <code>Number</code> | | The value to enter. |
3659
3678
  | [index] | <code>Number</code> | <code>0</code> | The index of the selector (in case there are more than one elements visible at the same time). |
3660
3679
  | [timeout] | <code>Number</code> | <code>30000</code> | The timeout to wait (ms). |
3661
3680
 
@@ -3673,7 +3692,7 @@ Fills the input field with the given selector and retries the action in case of
3673
3692
  | Param | Type | Default | Description |
3674
3693
  | --- | --- | --- | --- |
3675
3694
  | selector | <code>Object</code> | | The selector describing the element. |
3676
- | value | <code>String</code> | | The value to fill. |
3695
+ | value | <code>String</code> \| <code>Number</code> | | The value to enter. |
3677
3696
  | [index] | <code>Number</code> | <code>0</code> | The index of the selector (in case there are more than one elements visible at the same time). |
3678
3697
  | [timeout] | <code>Number</code> | <code>30000</code> | The timeout to wait (ms). |
3679
3698
  | [retries] | <code>Number</code> | <code>3</code> | The number of retries, can be set in config for all functions under params stepsRetries. |
@@ -3729,7 +3748,7 @@ Clears the input field with the given selector and fills the given value.
3729
3748
  | Param | Type | Default | Description |
3730
3749
  | --- | --- | --- | --- |
3731
3750
  | selector | <code>Object</code> | | The selector describing the element. |
3732
- | value | <code>String</code> | | The value to fill. |
3751
+ | value | <code>String</code> \| <code>Number</code> | | The value to enter. |
3733
3752
  | [index] | <code>Number</code> | <code>0</code> | The index of the selector (in case there are more than one elements visible at the same time). |
3734
3753
  | [timeout] | <code>Number</code> | <code>30000</code> | The timeout to wait (ms). |
3735
3754
 
@@ -3747,7 +3766,7 @@ Clears the input field with the given selector and fills the given value. Retrie
3747
3766
  | Param | Type | Default | Description |
3748
3767
  | --- | --- | --- | --- |
3749
3768
  | selector | <code>Object</code> | | The selector describing the element. |
3750
- | value | <code>String</code> | | The value to fill. |
3769
+ | value | <code>String</code> | | The value to enter. |
3751
3770
  | [index] | <code>Number</code> | <code>0</code> | The index of the selector (in case there are more than one elements visible at the same time). |
3752
3771
  | [timeout] | <code>Number</code> | <code>30000</code> | The timeout to wait (ms). |
3753
3772
  | [retries] | <code>Number</code> | <code>3</code> | The number of retries, can be set in config for all functions under params stepsRetries. |
@@ -3785,7 +3804,7 @@ Clears the smart filed with the given selector and fills the given value.
3785
3804
  | Param | Type | Default | Description |
3786
3805
  | --- | --- | --- | --- |
3787
3806
  | selector | <code>Object</code> | | The selector describing the element. |
3788
- | value | <code>String</code> | | The value to fill. |
3807
+ | value | <code>String</code> | | The value to enter. |
3789
3808
  | [index] | <code>Number</code> | <code>0</code> | The index of the selector (in case there are more than one elements visible at the same time). |
3790
3809
  | [timeout] | <code>Number</code> | <code>30000</code> | The timeout to wait (ms). |
3791
3810
 
@@ -3803,7 +3822,7 @@ Clears the smart filed with the given selector and fills the given value and ret
3803
3822
  | Param | Type | Default | Description |
3804
3823
  | --- | --- | --- | --- |
3805
3824
  | selector | <code>Object</code> | | The selector describing the element. |
3806
- | value | <code>String</code> | | The value to fill. |
3825
+ | value | <code>String</code> | | The value to enter. |
3807
3826
  | [index] | <code>Number</code> | <code>0</code> | The index of the selector (in case there are more than one elements visible at the same time). |
3808
3827
  | [timeout] | <code>Number</code> | <code>30000</code> | The timeout to wait (ms). |
3809
3828
  | [retries] | <code>Number</code> | <code>3</code> | The number of retries, can be set in config for all functions under params stepsRetries. |
@@ -3904,6 +3923,25 @@ Clicks the arrow icon at the passed selector (select box), and retries in case i
3904
3923
  ```js
3905
3924
  await ui5.userInteraction.clickSelectArrowAndRetry(selector);
3906
3925
  ```
3926
+ <a name="ui5.userInteraction.selectFromTab"></a>
3927
+
3928
+ #### userInteraction.selectFromTab(selector, value, [index], [timeout])
3929
+ Selects the passed value on the tab with the given selector and checks if the tab got selected successfully.
3930
+ The function retries the click for maximal 3 times if the selection of the tab (blue underline) was not successful.
3931
+
3932
+ **Kind**: static method of [<code>userInteraction</code>](#ui5.userInteraction)
3933
+
3934
+ | Param | Type | Default | Description |
3935
+ | --- | --- | --- | --- |
3936
+ | selector | <code>Object</code> | | The selector describing the element. |
3937
+ | value | <code>String</code> | | The value to select. |
3938
+ | [index] | <code>Number</code> | <code>0</code> | The index of the selector (in case there are more than one elements visible at the same time). |
3939
+ | [timeout] | <code>Number</code> | <code>30000</code> | The timeout to wait (ms). |
3940
+
3941
+ **Example**
3942
+ ```js
3943
+ await ui5.userInteraction.selectFromTab(selector);
3944
+ ```
3907
3945
  <a name="ui5.userInteraction.mouseOverElement"></a>
3908
3946
 
3909
3947
  #### userInteraction.mouseOverElement(selector, [index], [timeout])
@@ -4047,6 +4085,7 @@ Global namespace for non UI5 modules.
4047
4085
  * [.isPresent(elem)](#nonUi5.element.isPresent) ⇒ <code>Boolean</code>
4048
4086
  * [.isPresentByCss(css, [index], [timeout])](#nonUi5.element.isPresentByCss) ⇒ <code>boolean</code>
4049
4087
  * [.isPresentByXPath(xpath, [index], [timeout])](#nonUi5.element.isPresentByXPath) ⇒ <code>boolean</code>
4088
+ * [.isSelected(elem)](#nonUi5.element.isSelected) ⇒ <code>boolean</code>
4050
4089
  * [.getAttributeValue(elem, [attribute])](#nonUi5.element.getAttributeValue) ⇒ <code>String</code>
4051
4090
  * [.getValue(elem)](#nonUi5.element.getValue) ⇒ <code>String</code>
4052
4091
  * [.setInnerHTML(elem)](#nonUi5.element.setInnerHTML) ⇒ <code>String</code>
@@ -4062,6 +4101,8 @@ Global namespace for non UI5 modules.
4062
4101
  * [.clickAndRetry(element, [timeout], [retries], [interval])](#nonUi5.userInteraction.clickAndRetry)
4063
4102
  * [.doubleClick(element, [timeout])](#nonUi5.userInteraction.doubleClick)
4064
4103
  * [.rightClick(element, [timeout])](#nonUi5.userInteraction.rightClick)
4104
+ * [.check(element)](#nonUi5.userInteraction.check)
4105
+ * [.uncheck(element)](#nonUi5.userInteraction.uncheck)
4065
4106
  * [.fill(element, value)](#nonUi5.userInteraction.fill)
4066
4107
  * [.fillAndRetry(element, value, [retries], [interval])](#nonUi5.userInteraction.fillAndRetry)
4067
4108
  * [.clear(element)](#nonUi5.userInteraction.clear)
@@ -4201,6 +4242,7 @@ await nonUi5.assertion.expectToBeNotVisible(elem, 5000);
4201
4242
  * [.isPresent(elem)](#nonUi5.element.isPresent) ⇒ <code>Boolean</code>
4202
4243
  * [.isPresentByCss(css, [index], [timeout])](#nonUi5.element.isPresentByCss) ⇒ <code>boolean</code>
4203
4244
  * [.isPresentByXPath(xpath, [index], [timeout])](#nonUi5.element.isPresentByXPath) ⇒ <code>boolean</code>
4245
+ * [.isSelected(elem)](#nonUi5.element.isSelected) ⇒ <code>boolean</code>
4204
4246
  * [.getAttributeValue(elem, [attribute])](#nonUi5.element.getAttributeValue) ⇒ <code>String</code>
4205
4247
  * [.getValue(elem)](#nonUi5.element.getValue) ⇒ <code>String</code>
4206
4248
  * [.setInnerHTML(elem)](#nonUi5.element.setInnerHTML) ⇒ <code>String</code>
@@ -4543,7 +4585,7 @@ await nonUi5.element.isPresentByCss(".button01");
4543
4585
  <a name="nonUi5.element.isPresentByXPath"></a>
4544
4586
 
4545
4587
  #### element.isPresentByXPath(xpath, [index], [timeout]) ⇒ <code>boolean</code>
4546
- returns a boolean if the element is present at the DOM or not.
4588
+ Returns a boolean if the element is present at the DOM or not.
4547
4589
 
4548
4590
  **Kind**: static method of [<code>element</code>](#nonUi5.element)
4549
4591
 
@@ -4557,6 +4599,22 @@ returns a boolean if the element is present at the DOM or not.
4557
4599
  ```js
4558
4600
  await nonUi5.element.isPresentByXPath(".//*[text()='Create']");
4559
4601
  ```
4602
+ <a name="nonUi5.element.isSelected"></a>
4603
+
4604
+ #### element.isSelected(elem) ⇒ <code>boolean</code>
4605
+ Returns a boolean if the element (e.g. checkbox) is selected.
4606
+
4607
+ **Kind**: static method of [<code>element</code>](#nonUi5.element)
4608
+
4609
+ | Param | Type | Description |
4610
+ | --- | --- | --- |
4611
+ | elem | <code>Object</code> | The element. |
4612
+
4613
+ **Example**
4614
+ ```js
4615
+ const elem = await nonUi5.element.getById("elem01");
4616
+ const isSelected = await nonUi5.element.isSelected(elem);
4617
+ ```
4560
4618
  <a name="nonUi5.element.getAttributeValue"></a>
4561
4619
 
4562
4620
  #### element.getAttributeValue(elem, [attribute]) ⇒ <code>String</code>
@@ -4721,6 +4779,8 @@ await nonUi5.session.loginSapNetWeaver("john", "abc123!");
4721
4779
  * [.clickAndRetry(element, [timeout], [retries], [interval])](#nonUi5.userInteraction.clickAndRetry)
4722
4780
  * [.doubleClick(element, [timeout])](#nonUi5.userInteraction.doubleClick)
4723
4781
  * [.rightClick(element, [timeout])](#nonUi5.userInteraction.rightClick)
4782
+ * [.check(element)](#nonUi5.userInteraction.check)
4783
+ * [.uncheck(element)](#nonUi5.userInteraction.uncheck)
4724
4784
  * [.fill(element, value)](#nonUi5.userInteraction.fill)
4725
4785
  * [.fillAndRetry(element, value, [retries], [interval])](#nonUi5.userInteraction.fillAndRetry)
4726
4786
  * [.clear(element)](#nonUi5.userInteraction.clear)
@@ -4803,6 +4863,36 @@ Right Clicks on the passed element.
4803
4863
  const elem = await nonUi5.element.getById("button01");
4804
4864
  await nonUi5.userInteraction.rightClick(elem);
4805
4865
  ```
4866
+ <a name="nonUi5.userInteraction.check"></a>
4867
+
4868
+ #### userInteraction.check(element)
4869
+ Checks the given checkbox.
4870
+
4871
+ **Kind**: static method of [<code>userInteraction</code>](#nonUi5.userInteraction)
4872
+
4873
+ | Param | Type | Description |
4874
+ | --- | --- | --- |
4875
+ | element | <code>Object</code> | The element. |
4876
+
4877
+ **Example**
4878
+ ```js
4879
+ await nonUi5.userInteraction.check(selector);
4880
+ ```
4881
+ <a name="nonUi5.userInteraction.uncheck"></a>
4882
+
4883
+ #### userInteraction.uncheck(element)
4884
+ Unchecks the given checkbox.
4885
+
4886
+ **Kind**: static method of [<code>userInteraction</code>](#nonUi5.userInteraction)
4887
+
4888
+ | Param | Type | Description |
4889
+ | --- | --- | --- |
4890
+ | element | <code>Object</code> | The element. |
4891
+
4892
+ **Example**
4893
+ ```js
4894
+ await nonUi5.userInteraction.uncheck(selector);
4895
+ ```
4806
4896
  <a name="nonUi5.userInteraction.fill"></a>
4807
4897
 
4808
4898
  #### userInteraction.fill(element, value)
@@ -4813,7 +4903,7 @@ Fills the given value into the passed input.
4813
4903
  | Param | Type | Description |
4814
4904
  | --- | --- | --- |
4815
4905
  | element | <code>Object</code> | The element. |
4816
- | value | <code>String</code> | The value to be filled. |
4906
+ | value | <code>String</code> \| <code>Number</code> | The value to enter. |
4817
4907
 
4818
4908
  **Example**
4819
4909
  ```js
@@ -4830,7 +4920,7 @@ Fills the given value into the passed input, retries in case of a failure.
4830
4920
  | Param | Type | Default | Description |
4831
4921
  | --- | --- | --- | --- |
4832
4922
  | element | <code>Object</code> | | The element. |
4833
- | value | <code>String</code> | | The value to be filled. |
4923
+ | value | <code>String</code> \| <code>Number</code> | | The value to enter. |
4834
4924
  | [retries] | <code>Number</code> | <code>3</code> | The number of retries, can be set in config for all functions under params stepsRetries. |
4835
4925
  | [interval] | <code>Number</code> | <code>5000</code> | The delay between the retries (ms). Can be set in config for all functions under params.stepRetriesIntervals. |
4836
4926
 
@@ -4883,7 +4973,7 @@ Clears and fills the passed input element.
4883
4973
  | Param | Type | Description |
4884
4974
  | --- | --- | --- |
4885
4975
  | element | <code>Object</code> | The element. |
4886
- | value | <code>String</code> | The value to be filled in. |
4976
+ | value | <code>String</code> \| <code>Number</code> | The value to enter in. |
4887
4977
 
4888
4978
  **Example**
4889
4979
  ```js
@@ -4900,7 +4990,7 @@ Clears and fills the passed input, retries in case it fails.
4900
4990
  | Param | Type | Default | Description |
4901
4991
  | --- | --- | --- | --- |
4902
4992
  | element | <code>Object</code> | | The element. |
4903
- | value | <code>String</code> | | The value to be filled in. |
4993
+ | value | <code>String</code> \| <code>Number</code> | | The value to enter in. |
4904
4994
  | [retries] | <code>Number</code> | <code>3</code> | The number of retries, can be set in config for all functions under params stepsRetries. |
4905
4995
  | [interval] | <code>Number</code> | <code>5000</code> | The delay between the retries (ms). Can be set in config for all functions under params.stepRetriesIntervals. |
4906
4996
  | [verify] | <code>Boolean</code> | <code>true</code> | Specifies if the filled value should be verified. |
@@ -4919,7 +5009,7 @@ Moves the cursor/focus to the passed element.
4919
5009
 
4920
5010
  | Param | Type | Description |
4921
5011
  | --- | --- | --- |
4922
- | element | <code>Object</code> | The selector describing the element. |
5012
+ | element | <code>Object</code> | The element. |
4923
5013
  | [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. |
4924
5014
  | [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. |
4925
5015
 
package/docs/index.md CHANGED
@@ -1,9 +1,8 @@
1
1
  # **Qmate** Service
2
2
  **Qmate Service** is a custom [WebdriverIO](https://webdriver.io/) service for testing web applications and APIs.
3
3
 
4
- !!! warning
5
- The latest version of **WebdriverIO V8** is **not** yet supported. Support will follow soon.
6
-
4
+ !!! note
5
+ The latest release of the Qmate Service is compatible with **WebdriverIO V8**.
7
6
  ## Main features
8
7
  The main features of this service are:
9
8
 
@@ -8,15 +8,15 @@ export declare class UserInteraction {
8
8
  * @function fillActive
9
9
  * @memberOf common.userInteraction
10
10
  * @description Fills the active input with the given value.
11
- * @param {String} value - The value with witch the input should be filled.
11
+ * @param {String | Number} value - The value to enter.
12
12
  * @example await common.userInteraction.fillActive("My Value");
13
13
  */
14
- fillActive(value: string): Promise<void>;
14
+ fillActive(value: string | number): Promise<void>;
15
15
  /**
16
16
  * @function fillActiveAndRetry
17
17
  * @memberOf common.userInteraction
18
18
  * @description Enters the given value to the active input field and retries the action in case it fails.
19
- * @param {String} value - The value with witch the input should be filled.
19
+ * @param {String} value - The value to enter.
20
20
  * @param {Number} [retries=3] - The number of retries, can be set in config for all functions under params stepsRetries.
21
21
  * @param {Number} [interval=5000] - The delay between the retries (ms). Can be set in config for all functions under params.stepRetriesIntervals.
22
22
  * @example await common.userInteraction.fillActiveAndRetry("My Value");
@@ -16,16 +16,14 @@ class UserInteraction {
16
16
  * @function fillActive
17
17
  * @memberOf common.userInteraction
18
18
  * @description Fills the active input with the given value.
19
- * @param {String} value - The value with witch the input should be filled.
19
+ * @param {String | Number} value - The value to enter.
20
20
  * @example await common.userInteraction.fillActive("My Value");
21
21
  */
22
22
  async fillActive(value) {
23
- const vlf = this.vlf.initLog(this.fillActive);
24
- if (!(typeof value === "number" || typeof value === "string")) {
25
- throw new Error("Function 'fillActive' failed: Please provide a value(datatype - number/string) as argument.");
26
- }
27
- else {
23
+ const vl = this.vlf.initLog(this.fillActive);
24
+ if (typeof value === "number" || typeof value === "string") {
28
25
  try {
26
+ vl.log(`Setting the value of element to ${value}`);
29
27
  const elem = await $(await browser.getActiveElement());
30
28
  await elem.addValue(value);
31
29
  }
@@ -33,18 +31,21 @@ class UserInteraction {
33
31
  throw new Error(`Function 'fillActive' failed: ${error}`);
34
32
  }
35
33
  }
34
+ else {
35
+ throw new Error("Function 'fillActive' failed: Please provide a value(datatype - number/string) as argument.");
36
+ }
36
37
  }
37
38
  /**
38
39
  * @function fillActiveAndRetry
39
40
  * @memberOf common.userInteraction
40
41
  * @description Enters the given value to the active input field and retries the action in case it fails.
41
- * @param {String} value - The value with witch the input should be filled.
42
+ * @param {String} value - The value to enter.
42
43
  * @param {Number} [retries=3] - The number of retries, can be set in config for all functions under params stepsRetries.
43
44
  * @param {Number} [interval=5000] - The delay between the retries (ms). Can be set in config for all functions under params.stepRetriesIntervals.
44
45
  * @example await common.userInteraction.fillActiveAndRetry("My Value");
45
46
  */
46
47
  async fillActiveAndRetry(value, retries = 3, interval = 5000) {
47
- const vlf = this.vlf.initLog(this.fillActiveAndRetry);
48
+ const vl = this.vlf.initLog(this.fillActiveAndRetry);
48
49
  await util.function.retry(this.fillActive, [value], retries, interval, this);
49
50
  }
50
51
  /**
@@ -55,7 +56,7 @@ class UserInteraction {
55
56
  * @example await common.userInteraction.clearAndFillActive("My Value");
56
57
  */
57
58
  async clearAndFillActive(value) {
58
- const vlf = this.vlf.initLog(this.clearAndFillActive);
59
+ const vl = this.vlf.initLog(this.clearAndFillActive);
59
60
  if (typeof value === "number" || typeof value === "string") {
60
61
  const elem = await $(await browser.getActiveElement());
61
62
  await elem.setValue(value);
@@ -74,7 +75,7 @@ class UserInteraction {
74
75
  * @example await common.userInteraction.clearAndFillActiveAndRetry("My Value");
75
76
  */
76
77
  async clearAndFillActiveAndRetry(value, retries = 3, interval = 5000) {
77
- const vlf = this.vlf.initLog(this.clearAndFillActiveAndRetry);
78
+ const vl = this.vlf.initLog(this.clearAndFillActiveAndRetry);
78
79
  await util.function.retry(this.clearAndFillActive, [value], retries, interval, this);
79
80
  }
80
81
  // =================================== KEYS ===================================
@@ -88,7 +89,7 @@ class UserInteraction {
88
89
  * @example await common.userInteraction.pressKey(["\uE009", "Alt"]);
89
90
  */
90
91
  async pressKey(keys) {
91
- const vlf = this.vlf.initLog(this.pressKey);
92
+ const vl = this.vlf.initLog(this.pressKey);
92
93
  await browser.keys(keys);
93
94
  }
94
95
  /**
@@ -98,7 +99,7 @@ class UserInteraction {
98
99
  * @example await common.userInteraction.pressEnter();
99
100
  */
100
101
  async pressEnter() {
101
- const vlf = this.vlf.initLog(this.pressEnter);
102
+ const vl = this.vlf.initLog(this.pressEnter);
102
103
  await browser.keys(userInteraction_constants_1.KeyCodes.ENTER);
103
104
  }
104
105
  /**
@@ -108,7 +109,7 @@ class UserInteraction {
108
109
  * @example await common.userInteraction.pressTab();
109
110
  */
110
111
  async pressTab() {
111
- const vlf = this.vlf.initLog(this.pressTab);
112
+ const vl = this.vlf.initLog(this.pressTab);
112
113
  await browser.keys(userInteraction_constants_1.KeyCodes.TAB);
113
114
  }
114
115
  /**
@@ -118,7 +119,7 @@ class UserInteraction {
118
119
  * @example await common.userInteraction.pressF4();
119
120
  */
120
121
  async pressF4() {
121
- const vlf = this.vlf.initLog(this.pressF4);
122
+ const vl = this.vlf.initLog(this.pressF4);
122
123
  await browser.keys(userInteraction_constants_1.KeyCodes.F4);
123
124
  }
124
125
  /**
@@ -128,7 +129,7 @@ class UserInteraction {
128
129
  * @example await common.userInteraction.pressBackspace();
129
130
  */
130
131
  async pressBackspace() {
131
- const vlf = this.vlf.initLog(this.pressBackspace);
132
+ const vl = this.vlf.initLog(this.pressBackspace);
132
133
  await browser.keys(userInteraction_constants_1.KeyCodes.BACKSPACE);
133
134
  }
134
135
  /**
@@ -139,7 +140,7 @@ class UserInteraction {
139
140
  * @example await common.userInteraction.pressEscape();
140
141
  */
141
142
  async pressEscape() {
142
- const vlf = this.vlf.initLog(this.pressEscape);
143
+ const vl = this.vlf.initLog(this.pressEscape);
143
144
  await browser.keys(userInteraction_constants_1.KeyCodes.ESCAPE);
144
145
  }
145
146
  /**
@@ -149,7 +150,7 @@ class UserInteraction {
149
150
  * @example await common.userInteraction.pressArrowLeft();
150
151
  */
151
152
  async pressArrowLeft() {
152
- const vlf = this.vlf.initLog(this.pressArrowLeft);
153
+ const vl = this.vlf.initLog(this.pressArrowLeft);
153
154
  await browser.keys(userInteraction_constants_1.KeyCodes.ARROW_LEFT);
154
155
  }
155
156
  /**
@@ -159,7 +160,7 @@ class UserInteraction {
159
160
  * @example await common.userInteraction.pressArrowRight();
160
161
  */
161
162
  async pressArrowRight() {
162
- const vlf = this.vlf.initLog(this.pressArrowRight);
163
+ const vl = this.vlf.initLog(this.pressArrowRight);
163
164
  await browser.keys(userInteraction_constants_1.KeyCodes.ARROW_RIGHT);
164
165
  }
165
166
  }
@@ -1 +1 @@
1
- {"version":3,"file":"userInteraction.js","sourceRoot":"","sources":["../../../../src/reuse/modules/common/userInteraction.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;AAEb,8DAAkE;AAClE,qFAAiE;AAEjE;;;GAGG;AACH,MAAa,eAAe;IAA5B;QACU,QAAG,GAAG,IAAI,oCAAoB,CAAC,QAAQ,EAAE,iBAAiB,CAAC,CAAC;IAiKtE,CAAC;IA/JC,+EAA+E;IAC/E;;;;;;OAMG;IACH,KAAK,CAAC,UAAU,CAAC,KAAa;QAC5B,MAAM,GAAG,GAAG,IAAI,CAAC,GAA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AAC,OAAO,CAAC,CAAC;QAC1C,MAAM,OAAO,CAAC,IAAI,CAAC,oCAAQ,CAAC,EAAE,CAAC,CAAC;IAClC,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,cAAc;QAClB,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACjD,MAAM,OAAO,CAAC,IAAI,CAAC,oCAAQ,CAAC,SAAS,CAAC,CAAC;IACzC,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,WAAW;QACf,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC9C,MAAM,OAAO,CAAC,IAAI,CAAC,oCAAQ,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,cAAc;QAClB,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACjD,MAAM,OAAO,CAAC,IAAI,CAAC,oCAAQ,CAAC,UAAU,CAAC,CAAC;IAC1C,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,eAAe;QACnB,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAClD,MAAM,OAAO,CAAC,IAAI,CAAC,oCAAQ,CAAC,WAAW,CAAC,CAAC;IAC3C,CAAC;CACF;AArKD,0CAqKC;AACD,kBAAe,IAAI,eAAe,EAAE,CAAC"}
@@ -204,7 +204,7 @@ export declare class ElementModule {
204
204
  /**
205
205
  * @function isPresentByXPath
206
206
  * @memberOf nonUi5.element
207
- * @description returns a boolean if the element is present at the DOM or not.
207
+ * @description Returns a boolean if the element is present at the DOM or not.
208
208
  * @param {String} xpath - The XPath describing the element.
209
209
  * @param {Number} [index=0] - The index of the element (in case there are more than one elements visible at the same time).
210
210
  * @param {Number} [timeout=30000] - The timeout to wait (ms).
@@ -212,6 +212,16 @@ export declare class ElementModule {
212
212
  * @example await nonUi5.element.isPresentByXPath(".//*[text()='Create']");
213
213
  */
214
214
  isPresentByXPath(xpath: string, index?: number, timeout?: any): Promise<boolean>;
215
+ /**
216
+ * @function isSelected
217
+ * @memberOf nonUi5.element
218
+ * @description Returns a boolean if the element (e.g. checkbox) is selected.
219
+ * @param {Object} elem - The element.
220
+ * @returns {boolean}
221
+ * @example const elem = await nonUi5.element.getById("elem01");
222
+ * const isSelected = await nonUi5.element.isSelected(elem);
223
+ */
224
+ isSelected(elem: Element): Promise<boolean>;
215
225
  /**
216
226
  * @function getAttributeValue
217
227
  * @memberOf nonUi5.element
@@ -415,7 +415,7 @@ class ElementModule {
415
415
  /**
416
416
  * @function isPresentByXPath
417
417
  * @memberOf nonUi5.element
418
- * @description returns a boolean if the element is present at the DOM or not.
418
+ * @description Returns a boolean if the element is present at the DOM or not.
419
419
  * @param {String} xpath - The XPath describing the element.
420
420
  * @param {Number} [index=0] - The index of the element (in case there are more than one elements visible at the same time).
421
421
  * @param {Number} [timeout=30000] - The timeout to wait (ms).
@@ -426,6 +426,19 @@ class ElementModule {
426
426
  const vl = this.vlf.initLog(this.isPresentByXPath);
427
427
  return this.isPresentByCss(xpath, index, timeout);
428
428
  }
429
+ /**
430
+ * @function isSelected
431
+ * @memberOf nonUi5.element
432
+ * @description Returns a boolean if the element (e.g. checkbox) is selected.
433
+ * @param {Object} elem - The element.
434
+ * @returns {boolean}
435
+ * @example const elem = await nonUi5.element.getById("elem01");
436
+ * const isSelected = await nonUi5.element.isSelected(elem);
437
+ */
438
+ async isSelected(elem) {
439
+ const vl = this.vlf.initLog(this.isSelected);
440
+ return elem.isSelected();
441
+ }
429
442
  /**
430
443
  * @function getAttributeValue
431
444
  * @memberOf nonUi5.element