@sap_oss/wdio-qmate-service 1.1.0 → 1.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.
- package/docs/doc.md +355 -152
- package/docs/sections/bestPractices/authentication.md +0 -2
- package/docs/sections/contact.md +4 -0
- package/docs/sections/features/advancedDataHandling.md +1 -1
- package/docs/sections/features/dataHandling.md +2 -2
- package/lib/reuse/authenticator/customAuthenticator.js +4 -4
- package/lib/reuse/authenticator/formAuthenticator.js +4 -4
- package/lib/reuse/modules/service/odata.d.ts +3 -3
- package/lib/reuse/modules/service/odata.js +3 -3
- package/lib/reuse/modules/ui5/control.d.ts +6 -5
- package/lib/reuse/modules/ui5/control.js +5 -5
- package/lib/reuse/modules/ui5/control.js.map +1 -1
- package/lib/reuse/modules/ui5/session.d.ts +9 -8
- package/lib/reuse/modules/ui5/session.js +60 -45
- package/lib/reuse/modules/ui5/session.js.map +1 -1
- package/lib/reuse/modules/ui5/userInteraction.d.ts +34 -21
- package/lib/reuse/modules/ui5/userInteraction.js +149 -114
- package/lib/reuse/modules/ui5/userInteraction.js.map +1 -1
- package/package.json +2 -2
- package/test/authenticator/staticLogin/configCustom.js +1 -1
- package/test/authenticator/staticLogin/configFiori.js +1 -1
- package/test/authenticator/staticLogin/configSapCloud.js +1 -1
- package/test/authenticator/staticLogin/specs/custom.spec.js +2 -2
- package/test/authenticator/staticLogin/specs/customViaConfig.spec.js +1 -1
- package/test/authenticator/staticLogin/specs/plain.spec.js +4 -4
- package/test/authenticator/systemLogin/configCustom.js +2 -2
- package/test/authenticator/systemLogin/configFiori.js +3 -3
- package/test/authenticator/systemLogin/configPlain.js +1 -1
- package/test/authenticator/systemLogin/configSapCloud.js +3 -3
- package/test/core/dataExchange/utils.js +4 -4
- package/test/reuse/common/assertion/expectUrlToBe.spec.js +4 -4
- package/test/reuse/ui5/navigation/closePopups.spec.js +1 -1
- package/test/reuse/ui5/navigation/expectUnsupportedNavigationPopup.spec.js +6 -6
- package/test/reuse/ui5/navigation/navigateToApplication.spec.js +3 -3
- package/test/reuse/ui5/navigation/navigateToApplicationAndRetry.spec.js +3 -3
- package/test/reuse/ui5/navigation/navigateToSystemAndApplication.spec.js +7 -7
- package/test/reuse/ui5/navigation/navigateToSystemAndApplicationAndRetry.spec.js +4 -4
- package/test/reuse/ui5/navigation/test.navigation.conf.js +1 -1
- package/test/reuse/ui5/session/login.spec.js +4 -4
- package/test/reuse/ui5/session/loginFiori.spec.js +2 -2
- package/test/reuse/ui5/session/loginSapCloud.spec.js +3 -3
- package/test/reuse/ui5/session/logout.spec.js +2 -2
- package/test/reuse/ui5/session/switchUser.spec.js +6 -6
- package/test/reuse/ui5/userInteraction/clickTab.spec.js +52 -19
- package/test/reuse/ui5/userInteraction/selectFromTab.spec.js +38 -0
- package/test/reuse/ui5/userInteraction/test.userInteraction.conf.js +1 -0
- package/test/reuse/util/data/data/test.secure.json +3 -3
- package/test/reuse/util/data/decrypt.spec.js +1 -1
- package/test/reuse/util/data/getSecureData.spec.js +4 -4
- package/docs/bestPractices/spec.md +0 -0
- package/docs/gettingStarted/setup.md +0 -8
package/docs/doc.md
CHANGED
|
@@ -1146,7 +1146,8 @@ Slices the given string beginning at a specific substring.
|
|
|
1146
1146
|
|
|
1147
1147
|
**Example**
|
|
1148
1148
|
```js
|
|
1149
|
-
const sliced = util.formatter.sliceStringAt("prefixNR12345postfix", "NR", 7);
|
|
1149
|
+
const sliced = util.formatter.sliceStringAt("prefixNR12345postfix", "NR", 7);
|
|
1150
|
+
// returns "NR12345"
|
|
1150
1151
|
```
|
|
1151
1152
|
<a name="util.formatter.sliceStringAfter"></a>
|
|
1152
1153
|
|
|
@@ -1164,7 +1165,8 @@ Slices the given string after a specific substring.
|
|
|
1164
1165
|
|
|
1165
1166
|
**Example**
|
|
1166
1167
|
```js
|
|
1167
|
-
const sliced = util.formatter.sliceStringAfter("prefixNR12345postfix", "NR", 5);
|
|
1168
|
+
const sliced = util.formatter.sliceStringAfter("prefixNR12345postfix", "NR", 5);
|
|
1169
|
+
// returns "12345"
|
|
1168
1170
|
```
|
|
1169
1171
|
<a name="util.formatter.trimString"></a>
|
|
1170
1172
|
|
|
@@ -1179,7 +1181,8 @@ Removes whitespace from both sides of the given string.
|
|
|
1179
1181
|
|
|
1180
1182
|
**Example**
|
|
1181
1183
|
```js
|
|
1182
|
-
const trimmed = util.formatter.trimString(" value ");
|
|
1184
|
+
const trimmed = util.formatter.trimString(" value ");
|
|
1185
|
+
// returns "value"
|
|
1183
1186
|
```
|
|
1184
1187
|
<a name="util.formatter.extractNumberFromString"></a>
|
|
1185
1188
|
|
|
@@ -1196,11 +1199,13 @@ Extracts all numbers from a string.
|
|
|
1196
1199
|
|
|
1197
1200
|
**Example**
|
|
1198
1201
|
```js
|
|
1199
|
-
const extracted = util.formatter.extractNumberFromString("prefixNR12345postfix");
|
|
1202
|
+
const extracted = util.formatter.extractNumberFromString("prefixNR12345postfix");
|
|
1203
|
+
// returns "12345"
|
|
1200
1204
|
```
|
|
1201
1205
|
**Example**
|
|
1202
1206
|
```js
|
|
1203
|
-
const extracted = util.formatter.extractNumberFromString("first12345 someText second 20 abc", 1);
|
|
1207
|
+
const extracted = util.formatter.extractNumberFromString("first12345 someText second 20 abc", 1);
|
|
1208
|
+
// returns "20"
|
|
1204
1209
|
```
|
|
1205
1210
|
<a name="util.formatter.stringifyJSON"></a>
|
|
1206
1211
|
|
|
@@ -1251,11 +1256,15 @@ formats date.
|
|
|
1251
1256
|
|
|
1252
1257
|
**Example**
|
|
1253
1258
|
```js
|
|
1254
|
-
const date = new Date(2020, 0, 17);
|
|
1259
|
+
const date = new Date(2020, 0, 17);
|
|
1260
|
+
const formattedDate = util.formatter.formatDate(date, "mm/dd/yyyy");
|
|
1261
|
+
// returns "01/17/2020"
|
|
1255
1262
|
```
|
|
1256
1263
|
**Example**
|
|
1257
1264
|
```js
|
|
1258
|
-
const date = new Date(2022, 3, 12);
|
|
1265
|
+
const date = new Date(2022, 3, 12);
|
|
1266
|
+
const formattedDate = util.formatter.formatDate(date, "mmm dd, yyyy");
|
|
1267
|
+
// returns "Apr 03, 2022"
|
|
1259
1268
|
```
|
|
1260
1269
|
<a name="util.function"></a>
|
|
1261
1270
|
|
|
@@ -1287,7 +1296,9 @@ await util.function.retry(ui5.userInteraction.fill, [selector, value], 4, 10000)
|
|
|
1287
1296
|
```
|
|
1288
1297
|
**Example**
|
|
1289
1298
|
```js
|
|
1290
|
-
await util.function.retry(async () => {
|
|
1291
1299
|
await ui5.userInteraction.fill(selector, "ABC");
|
|
1300
|
+
await util.function.retry(async () => {
|
|
1301
|
+
await ui5.userInteraction.fill(selector, "ABC");
|
|
1302
|
+
}, [], 2, 30000);
|
|
1292
1303
|
```
|
|
1293
1304
|
<a name="util.function.executeOptional"></a>
|
|
1294
1305
|
|
|
@@ -1307,7 +1318,9 @@ await util.function.executeOptional(ui5.userInteraction.fill, [selector, value])
|
|
|
1307
1318
|
```
|
|
1308
1319
|
**Example**
|
|
1309
1320
|
```js
|
|
1310
|
-
await util.function.executeOptional(async () => {
|
|
1311
1321
|
await ui5.userInteraction.fill(selector, "ABC");
|
|
1322
|
+
await util.function.executeOptional(async () => {
|
|
1323
|
+
await ui5.userInteraction.fill(selector, "ABC");
|
|
1324
|
+
}, []);
|
|
1312
1325
|
```
|
|
1313
1326
|
<a name="util.system"></a>
|
|
1314
1327
|
|
|
@@ -1442,7 +1455,10 @@ Global namespace for UI5 modules.
|
|
|
1442
1455
|
* [.userInteraction](#ui5.userInteraction)
|
|
1443
1456
|
* [.click(selector, [index], [timeout])](#ui5.userInteraction.click)
|
|
1444
1457
|
* [.clickAndRetry(selector, [index], [timeout], [retries], [interval])](#ui5.userInteraction.clickAndRetry)
|
|
1458
|
+
* [.doubleClick(selector, [index], [timeout])](#ui5.userInteraction.doubleClick)
|
|
1459
|
+
* [.rightClick(selector, [index], [timeout])](#ui5.userInteraction.rightClick)
|
|
1445
1460
|
* [.clickTab(selector, [index], [timeout])](#ui5.userInteraction.clickTab)
|
|
1461
|
+
* [.selectFromTab(selector, value, [index], [timeout])](#ui5.userInteraction.selectFromTab)
|
|
1446
1462
|
* [.clickListItem(selector, [index], [timeout])](#ui5.userInteraction.clickListItem)
|
|
1447
1463
|
* [.fill(selector, value, [index], [timeout])](#ui5.userInteraction.fill)
|
|
1448
1464
|
* [.fillAndRetry(selector, value, [index], [timeout], [retries], [interval])](#ui5.userInteraction.fillAndRetry)
|
|
@@ -1464,8 +1480,6 @@ Global namespace for UI5 modules.
|
|
|
1464
1480
|
* [.openF4Help(selector, [index], [timeout], useF4Key)](#ui5.userInteraction.openF4Help)
|
|
1465
1481
|
* [.searchFor(selector, [index], [timeout], useEnter)](#ui5.userInteraction.searchFor)
|
|
1466
1482
|
* [.resetSearch(selector, [index], [timeout])](#ui5.userInteraction.resetSearch)
|
|
1467
|
-
* [.doubleClick(selector, [index], [timeout])](#ui5.userInteraction.doubleClick)
|
|
1468
|
-
* [.rightClick(selector, [index], [timeout])](#ui5.userInteraction.rightClick)
|
|
1469
1483
|
|
|
1470
1484
|
<a name="ui5.assertion"></a>
|
|
1471
1485
|
|
|
@@ -1929,7 +1943,11 @@ Executes a native UI5 action as callback function in the browser on the given UI
|
|
|
1929
1943
|
|
|
1930
1944
|
**Example**
|
|
1931
1945
|
```js
|
|
1932
|
-
const selector = {"elementProperties":{"metadata":"sap.m.StandardListItem", "id": "*categoryList-7"}};
|
|
1933
1946
|
done(control.getProperty(args.property));
|
|
1947
|
+
const selector = {"elementProperties":{"metadata":"sap.m.StandardListItem", "id": "*categoryList-7"}};
|
|
1948
|
+
const args = {"property": "text"};
|
|
1949
|
+
const title = await ui5.control.execute(function (control, args, done) {
|
|
1950
|
+
done(control.getProperty(args.property));
|
|
1951
|
+
}, selector, args);
|
|
1934
1952
|
```
|
|
1935
1953
|
<a name="ui5.control.getProperty"></a>
|
|
1936
1954
|
|
|
@@ -1945,7 +1963,10 @@ Gets the UI5 control property of the given element.
|
|
|
1945
1963
|
|
|
1946
1964
|
**Example**
|
|
1947
1965
|
```js
|
|
1948
|
-
const selector = { "elementProperties":{"metadata":"sap.m.StandardListItem","mProperties":{ "title":[{"path":"CategoryName"}] }};
|
|
1966
|
+
const selector = { "elementProperties":{"metadata":"sap.m.StandardListItem","mProperties":{ "title":[{"path":"CategoryName"}] }};
|
|
1967
|
+
const elem = await ui5.element.getDisplayedElement(selector);
|
|
1968
|
+
const propertyName = "title";
|
|
1969
|
+
const val = await ui5.control.getProperty(elem, propertyName);
|
|
1949
1970
|
```
|
|
1950
1971
|
<a name="ui5.control.getAggregationProperty"></a>
|
|
1951
1972
|
|
|
@@ -1961,7 +1982,10 @@ Gets the UI5 control aggregation property of the given element.
|
|
|
1961
1982
|
|
|
1962
1983
|
**Example**
|
|
1963
1984
|
```js
|
|
1964
|
-
const selector = { "elementProperties":{"metadata":"sap.m.StandardListItem","mProperties":{ "items":[{"path":"/Categories"}] }};
|
|
1985
|
+
const selector = { "elementProperties":{"metadata":"sap.m.StandardListItem","mProperties":{ "items":[{"path":"/Categories"}] }};
|
|
1986
|
+
const elem = await ui5.element.getDisplayedElement(selector);
|
|
1987
|
+
const propertyName = "tooltip";
|
|
1988
|
+
const val = await ui5.control.getAggregationProperty(elem, propertyName);
|
|
1965
1989
|
```
|
|
1966
1990
|
<a name="ui5.control.getAssociationProperty"></a>
|
|
1967
1991
|
|
|
@@ -1977,7 +2001,10 @@ Get UI control property
|
|
|
1977
2001
|
|
|
1978
2002
|
**Example**
|
|
1979
2003
|
```js
|
|
1980
|
-
const selector = { "elementProperties":{"metadata":"sap.m.MultiComboBox","mProperties":{}};
|
|
2004
|
+
const selector = { "elementProperties":{"metadata":"sap.m.MultiComboBox","mProperties":{}};
|
|
2005
|
+
const elem = await ui5.element.getDisplayedElement(selector);
|
|
2006
|
+
const propertyName = "selectedItems";
|
|
2007
|
+
const propertyValue = await ui5.control.getAssociationProperty(elem, propertyName);
|
|
1981
2008
|
```
|
|
1982
2009
|
<a name="ui5.control.getBindingContextPathProperty"></a>
|
|
1983
2010
|
|
|
@@ -1992,7 +2019,9 @@ Get UI control binding context path
|
|
|
1992
2019
|
|
|
1993
2020
|
**Example**
|
|
1994
2021
|
```js
|
|
1995
|
-
const selector = { "elementProperties":{"metadata":"sap.m.StandardListItem","mProperties":{"title":[{"path":"CategoryName"}] }};
|
|
2022
|
+
const selector = { "elementProperties":{"metadata":"sap.m.StandardListItem","mProperties":{"title":[{"path":"CategoryName"}] }};
|
|
2023
|
+
const elem = await ui5.element.getDisplayedElement(selector);
|
|
2024
|
+
const context = await ui5.control.getBindingContextPathProperty(elem);
|
|
1996
2025
|
```
|
|
1997
2026
|
<a name="ui5.control.getPropertyBinding"></a>
|
|
1998
2027
|
|
|
@@ -2009,7 +2038,10 @@ Get UI control property
|
|
|
2009
2038
|
|
|
2010
2039
|
**Example**
|
|
2011
2040
|
```js
|
|
2012
|
-
const selector = { "elementProperties":{"metadata":"sap.m.StandardListItem","mProperties":{ "title":[{"path":"CategoryName"}] }};
|
|
2041
|
+
const selector = { "elementProperties":{"metadata":"sap.m.StandardListItem","mProperties":{ "title":[{"path":"CategoryName"}] }};
|
|
2042
|
+
const elem = await ui5.element.getDisplayedElement(selector);
|
|
2043
|
+
const propertyName = "title";
|
|
2044
|
+
const binding = await ui5.control.getPropertyBinding(elem, propertyName);
|
|
2013
2045
|
```
|
|
2014
2046
|
<a name="ui5.date"></a>
|
|
2015
2047
|
|
|
@@ -2036,12 +2068,14 @@ Picks the passed date using the "DatePicker" with the given selector.
|
|
|
2036
2068
|
|
|
2037
2069
|
**Example**
|
|
2038
2070
|
```js
|
|
2039
|
-
const today = await common.date.calculate("today");
|
|
2071
|
+
const today = await common.date.calculate("today");
|
|
2072
|
+
await ui5.date.pick(selector, date);
|
|
2040
2073
|
```
|
|
2041
2074
|
<a name="ui5.date.pickRange"></a>
|
|
2042
2075
|
|
|
2043
2076
|
#### date.pickRange(selector, range, [index])
|
|
2044
|
-
Picks the passed date range using the "DatePicker" with the given selector.
|
|
2077
|
+
Picks the passed date range using the "DatePicker" with the given selector.
|
|
2078
|
+
Note that this will only work within the current month!
|
|
2045
2079
|
|
|
2046
2080
|
**Kind**: static method of [<code>date</code>](#ui5.date)
|
|
2047
2081
|
|
|
@@ -2053,7 +2087,10 @@ Picks the passed date range using the "DatePicker" with the given selector.
|
|
|
2053
2087
|
|
|
2054
2088
|
**Example**
|
|
2055
2089
|
```js
|
|
2056
|
-
const start = await common.date.calculate("2020, 9, 20");
|
|
2090
|
+
const start = await common.date.calculate("2020, 9, 20");
|
|
2091
|
+
const end = await common.date.calculate("2021, 1, 3");
|
|
2092
|
+
const range = [start, end];
|
|
2093
|
+
await ui5.date.pickRange(selector, range);
|
|
2057
2094
|
```
|
|
2058
2095
|
<a name="ui5.date.fillRange"></a>
|
|
2059
2096
|
|
|
@@ -2070,7 +2107,10 @@ Enters the passed date range to the date input with the given selector by provid
|
|
|
2070
2107
|
|
|
2071
2108
|
**Example**
|
|
2072
2109
|
```js
|
|
2073
|
-
const start = await common.date.calculate("2020, 9, 20", "dd.mm.yyyy");
|
|
2110
|
+
const start = await common.date.calculate("2020, 9, 20", "dd.mm.yyyy");
|
|
2111
|
+
const end = await common.date.calculate("2021, 1, 3", "dd.mm.yyyy");
|
|
2112
|
+
const range = [start, end];
|
|
2113
|
+
await ui5.date.fillRange(selector, range);
|
|
2074
2114
|
```
|
|
2075
2115
|
<a name="ui5.element"></a>
|
|
2076
2116
|
|
|
@@ -2164,7 +2204,9 @@ const elem = await ui5.element.getByText(selector, "Home");
|
|
|
2164
2204
|
<a name="ui5.element.getByChild"></a>
|
|
2165
2205
|
|
|
2166
2206
|
#### element.getByChild(elementSelector, childSelector, [index], [timeout]) ⇒ <code>Object</code>
|
|
2167
|
-
Gets an element by its selector and child selector.
|
|
2207
|
+
Gets an element by its selector and child selector.
|
|
2208
|
+
Can be used as unique combination between element and child properties when multiple elements have the same properties.
|
|
2209
|
+
Note: For nested selectors, all properties except of the "elementProperties" are being ignored.
|
|
2168
2210
|
|
|
2169
2211
|
**Kind**: static method of [<code>element</code>](#ui5.element)
|
|
2170
2212
|
**Returns**: <code>Object</code> - The found element.
|
|
@@ -2178,12 +2220,20 @@ Gets an element by its selector and child selector.
|
|
|
2178
2220
|
|
|
2179
2221
|
**Example**
|
|
2180
2222
|
```js
|
|
2181
|
-
const elementSelector = {
|
|
2182
2223
|
"elementProperties": {...}
|
|
2183
2224
|
"elementProperties": {...}
|
|
2225
|
+
const elementSelector = {
|
|
2226
|
+
"elementProperties": {...}
|
|
2227
|
+
};
|
|
2228
|
+
const childSelector = {
|
|
2229
|
+
"elementProperties": {...}
|
|
2230
|
+
};
|
|
2231
|
+
const elem = await ui5.element.getByChild(elementSelector, childSelector);
|
|
2184
2232
|
```
|
|
2185
2233
|
<a name="ui5.element.getByParent"></a>
|
|
2186
2234
|
|
|
2187
2235
|
#### element.getByParent(elementSelector, parentSelector, [index], [timeout]) ⇒ <code>Object</code>
|
|
2188
|
-
Gets an element by its selector and parent selector.
|
|
2236
|
+
Gets an element by its selector and parent selector.
|
|
2237
|
+
Can be used as unique combination between element and parent properties when multiple elements have the same properties.
|
|
2238
|
+
Note: For nested selectors, all properties except of the "elementProperties" are being ignored.
|
|
2189
2239
|
|
|
2190
2240
|
**Kind**: static method of [<code>element</code>](#ui5.element)
|
|
2191
2241
|
**Returns**: <code>Object</code> - The found element.
|
|
@@ -2197,7 +2247,13 @@ Gets an element by its selector and parent selector.
|
|
|
2197
2247
|
|
|
2198
2248
|
**Example**
|
|
2199
2249
|
```js
|
|
2200
|
-
const elementSelector = {
|
|
2201
2250
|
"elementProperties": {...}
|
|
2202
2251
|
"elementProperties": {...}
|
|
2252
|
+
const elementSelector = {
|
|
2253
|
+
"elementProperties": {...}
|
|
2254
|
+
};
|
|
2255
|
+
const parentSelector = {
|
|
2256
|
+
"elementProperties": {...}
|
|
2257
|
+
};
|
|
2258
|
+
const elem = await ui5.element.getByParent(elementSelector, parentSelector);
|
|
2203
2259
|
```
|
|
2204
2260
|
<a name="ui5.element.getId"></a>
|
|
2205
2261
|
|
|
@@ -2857,7 +2913,9 @@ Navigates to the application with the passed queryParams via the passed intent.
|
|
|
2857
2913
|
|
|
2858
2914
|
**Example**
|
|
2859
2915
|
```js
|
|
2860
|
-
const intent = "PurchaseOrder-manage"
|
|
2916
|
+
const intent = "PurchaseOrder-manage"
|
|
2917
|
+
const queryParams = "?sap-language=EN&responderOn=true";
|
|
2918
|
+
await ui5.navigation.navigateToApplicationWithQueryParams(intent, queryParams);
|
|
2861
2919
|
```
|
|
2862
2920
|
<a name="ui5.navigation.navigateToApplicationWithQueryParamsAndRetry"></a>
|
|
2863
2921
|
|
|
@@ -2877,7 +2935,9 @@ Navigates to the application via the passed intent, and retries in case it fails
|
|
|
2877
2935
|
|
|
2878
2936
|
**Example**
|
|
2879
2937
|
```js
|
|
2880
|
-
const intent = "PurchaseOrder-manage"
|
|
2938
|
+
const intent = "PurchaseOrder-manage"
|
|
2939
|
+
const queryParams = "?sap-language=EN&responderOn=true";
|
|
2940
|
+
await ui5.navigation.navigateToApplicationWithQueryParamsAndRetry(intent, queryParams);
|
|
2881
2941
|
```
|
|
2882
2942
|
<a name="ui5.navigation.closePopups"></a>
|
|
2883
2943
|
|
|
@@ -2897,7 +2957,8 @@ await ui5.navigation.closePopups();
|
|
|
2897
2957
|
<a name="ui5.navigation.expectUnsupportedNavigationPopup"></a>
|
|
2898
2958
|
|
|
2899
2959
|
#### navigation.expectUnsupportedNavigationPopup(navigationTarget)
|
|
2900
|
-
Expects navigation to an app that is not supported.
|
|
2960
|
+
Expects navigation to an app that is not supported.
|
|
2961
|
+
This can be the case for Mocked tests when the application does not exist or when the app is not included in a role.
|
|
2901
2962
|
|
|
2902
2963
|
**Kind**: static method of [<code>navigation</code>](#ui5.navigation)
|
|
2903
2964
|
|
|
@@ -3040,7 +3101,7 @@ Login with specific username and password. This function works for both fiori an
|
|
|
3040
3101
|
| Param | Type | Default | Description |
|
|
3041
3102
|
| --- | --- | --- | --- |
|
|
3042
3103
|
| username | <code>String</code> | | The username. |
|
|
3043
|
-
| [password] | <code>String</code> | <code>"
|
|
3104
|
+
| [password] | <code>String</code> | <code>"super-duper-sensitive-pw"</code> | The password. |
|
|
3044
3105
|
| [verify] | <code>Boolean</code> | <code>false</code> | Specifies if the function will check the shell header after logging in. |
|
|
3045
3106
|
| [timeout] | <code>Number</code> | <code>30000</code> | The timeout to wait (ms). |
|
|
3046
3107
|
|
|
@@ -3062,7 +3123,7 @@ Login with fioriForm and specific username and password.
|
|
|
3062
3123
|
| Param | Type | Default | Description |
|
|
3063
3124
|
| --- | --- | --- | --- |
|
|
3064
3125
|
| username | <code>String</code> | | The username. |
|
|
3065
|
-
| [password] | <code>String</code> | <code>"
|
|
3126
|
+
| [password] | <code>String</code> | <code>"super-duper-sensitive-pw"</code> | The password. |
|
|
3066
3127
|
| [verify] | <code>Boolean</code> | <code>false</code> | Specifies if the function will check the shell header after logging in. |
|
|
3067
3128
|
|
|
3068
3129
|
**Example**
|
|
@@ -3079,7 +3140,7 @@ Login with sapCloud form and specific username and password.
|
|
|
3079
3140
|
| Param | Type | Default | Description |
|
|
3080
3141
|
| --- | --- | --- | --- |
|
|
3081
3142
|
| username | <code>String</code> | | The username. |
|
|
3082
|
-
| [password] | <code>String</code> | <code>"
|
|
3143
|
+
| [password] | <code>String</code> | <code>"super-duper-sensitive-pw"</code> | The password. |
|
|
3083
3144
|
| [verify] | <code>Boolean</code> | <code>false</code> | Specifies if the function will check the shell header after logging in. |
|
|
3084
3145
|
|
|
3085
3146
|
**Example**
|
|
@@ -3096,7 +3157,7 @@ Login with custom form and specific username and password.
|
|
|
3096
3157
|
| Param | Type | Default | Description |
|
|
3097
3158
|
| --- | --- | --- | --- |
|
|
3098
3159
|
| username | <code>String</code> | | The username. |
|
|
3099
|
-
| [password] | <code>String</code> | <code>"
|
|
3160
|
+
| [password] | <code>String</code> | <code>"super-duper-sensitive-pw"</code> | The password. |
|
|
3100
3161
|
| usernameFieldSelector | <code>String</code> | | The CSS selector of the username field. |
|
|
3101
3162
|
| passwordFieldSelector | <code>String</code> | | The CSS selector of the password field. |
|
|
3102
3163
|
| logonButtonSelector | <code>String</code> | | The CSS selector of the login button. |
|
|
@@ -3116,32 +3177,32 @@ Login with specific username and password. The selectors will be taken from the
|
|
|
3116
3177
|
| Param | Type | Default | Description |
|
|
3117
3178
|
| --- | --- | --- | --- |
|
|
3118
3179
|
| username | <code>String</code> | | The username. Can be specified in spec or config. If specified in both credentials will be taken from config. |
|
|
3119
|
-
| password | <code>String</code> | <code>"
|
|
3180
|
+
| password | <code>String</code> | <code>"super-duper-sensitive-pw"</code> | The password. Can be specified in spec or config. If specified in both credentials will be taken from config. |
|
|
3120
3181
|
| [verify] | <code>Boolean</code> | <code>false</code> | Specifies if the function will check the shell header after logging in. |
|
|
3121
3182
|
|
|
3122
3183
|
**Example**
|
|
3123
3184
|
```js
|
|
3124
|
-
// config - SAMPLE 1
|
|
3125
|
-
auth: {
|
|
3126
|
-
formType: 'plain',
|
|
3127
|
-
usernameFieldSelector: "#USERNAME_BLOCK input",
|
|
3128
|
-
passwordFieldSelector: "#PASSWORD_BLOCK input",
|
|
3129
|
-
logonButtonSelector: "#LOGIN_LINK"
|
|
3130
|
-
},
|
|
3131
|
-
// spec
|
|
3132
|
-
await ui5.session.loginCustomViaConfig("JOHN_DOE", "abc123!");
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
// config - SAMPLE 2
|
|
3136
|
-
auth: {
|
|
3137
|
-
formType: "plain",
|
|
3138
|
-
username: "PURCH_EXT",
|
|
3139
|
-
password: "
|
|
3140
|
-
usernameFieldSelector: "#USERNAME_BLOCK input",
|
|
3141
|
-
passwordFieldSelector: "#PASSWORD_BLOCK input",
|
|
3142
|
-
logonButtonSelector: "#LOGIN_LINK"
|
|
3143
|
-
},
|
|
3144
|
-
// spec
|
|
3185
|
+
// config - SAMPLE 1
|
|
3186
|
+
auth: {
|
|
3187
|
+
formType: 'plain',
|
|
3188
|
+
usernameFieldSelector: "#USERNAME_BLOCK input",
|
|
3189
|
+
passwordFieldSelector: "#PASSWORD_BLOCK input",
|
|
3190
|
+
logonButtonSelector: "#LOGIN_LINK"
|
|
3191
|
+
},
|
|
3192
|
+
// spec
|
|
3193
|
+
await ui5.session.loginCustomViaConfig("JOHN_DOE", "abc123!");
|
|
3194
|
+
|
|
3195
|
+
|
|
3196
|
+
// config - SAMPLE 2
|
|
3197
|
+
auth: {
|
|
3198
|
+
formType: "plain",
|
|
3199
|
+
username: "PURCH_EXT",
|
|
3200
|
+
password: "super-duper-sensitive-pw",
|
|
3201
|
+
usernameFieldSelector: "#USERNAME_BLOCK input",
|
|
3202
|
+
passwordFieldSelector: "#PASSWORD_BLOCK input",
|
|
3203
|
+
logonButtonSelector: "#LOGIN_LINK"
|
|
3204
|
+
},
|
|
3205
|
+
// spec
|
|
3145
3206
|
await ui5.session.loginCustomViaConfig();
|
|
3146
3207
|
```
|
|
3147
3208
|
<a name="ui5.session.logout"></a>
|
|
@@ -3169,7 +3230,7 @@ switches the user according to the passed username and password.
|
|
|
3169
3230
|
| Param | Type | Default | Description |
|
|
3170
3231
|
| --- | --- | --- | --- |
|
|
3171
3232
|
| username | <code>String</code> | | The username. |
|
|
3172
|
-
| [password] | <code>String</code> | <code>"
|
|
3233
|
+
| [password] | <code>String</code> | <code>"super-duper-sensitive-pw"</code> | The password. |
|
|
3173
3234
|
| [authenticator] | <code>Object</code> | | The login form type. Set to null to use generic login. |
|
|
3174
3235
|
| [wait] | <code>Number</code> | <code>10000</code> | The waiting time between logout and login (ms). |
|
|
3175
3236
|
|
|
@@ -3179,12 +3240,14 @@ await ui5.session.switchUser("PURCHASER");
|
|
|
3179
3240
|
```
|
|
3180
3241
|
**Example**
|
|
3181
3242
|
```js
|
|
3182
|
-
const authenticator = ui5.authenticators.fioriForm;
|
|
3243
|
+
const authenticator = ui5.authenticators.fioriForm;
|
|
3244
|
+
await ui5.session.switchUser("PURCHASER", "super-duper-sensitive-pw", authenticator, 30000);
|
|
3183
3245
|
```
|
|
3184
3246
|
<a name="ui5.session.expectLogoutText"></a>
|
|
3185
3247
|
|
|
3186
3248
|
#### session.expectLogoutText()
|
|
3187
|
-
Expects the logout text after logout to be "You have been logged off.
|
|
3249
|
+
Expects the logout text after logout to be "You have been logged off.
|
|
3250
|
+
This is essential for chaining scripts, so that no static browser sleep in the spec itself is required anymore.
|
|
3188
3251
|
|
|
3189
3252
|
**Kind**: static method of [<code>session</code>](#ui5.session)
|
|
3190
3253
|
**Example**
|
|
@@ -3219,7 +3282,14 @@ await ui5.table.sortColumnAscending("Supplier");
|
|
|
3219
3282
|
```
|
|
3220
3283
|
**Example**
|
|
3221
3284
|
```js
|
|
3222
|
-
const glAccountItemsTable = {
|
|
3223
3285
|
"elementProperties": {
|
|
3224
3286
|
"viewName": "ui.s2p.mm.supplinvoice.manage.s1.view.S1",
|
|
3225
3287
|
"metadata": "sap.m.Table",
|
|
3226
3288
|
"id": "*idS2P.MM.MSI.TableGLAccountItems"
|
|
3227
3289
|
}
|
|
3290
|
+
const glAccountItemsTable = {
|
|
3291
|
+
"elementProperties": {
|
|
3292
|
+
"viewName": "ui.s2p.mm.supplinvoice.manage.s1.view.S1",
|
|
3293
|
+
"metadata": "sap.m.Table",
|
|
3294
|
+
"id": "*idS2P.MM.MSI.TableGLAccountItems"
|
|
3295
|
+
}
|
|
3296
|
+
};
|
|
3297
|
+
await ui5.table.sortColumnAscending("Amount", glAccountItemsTable);
|
|
3228
3298
|
```
|
|
3229
3299
|
<a name="ui5.table.sortColumnDescending"></a>
|
|
3230
3300
|
|
|
@@ -3239,7 +3309,14 @@ await ui5.table.sortColumnDescending("Supplier");
|
|
|
3239
3309
|
```
|
|
3240
3310
|
**Example**
|
|
3241
3311
|
```js
|
|
3242
|
-
const glAccountItemsTable = {
|
|
3243
3312
|
"elementProperties": {
|
|
3244
3313
|
"viewName": "ui.s2p.mm.supplinvoice.manage.s1.view.S1",
|
|
3245
3314
|
"metadata": "sap.m.Table",
|
|
3246
3315
|
"id": "*idS2P.MM.MSI.TableGLAccountItems"
|
|
3247
3316
|
}
|
|
3317
|
+
const glAccountItemsTable = {
|
|
3318
|
+
"elementProperties": {
|
|
3319
|
+
"viewName": "ui.s2p.mm.supplinvoice.manage.s1.view.S1",
|
|
3320
|
+
"metadata": "sap.m.Table",
|
|
3321
|
+
"id": "*idS2P.MM.MSI.TableGLAccountItems"
|
|
3322
|
+
}
|
|
3323
|
+
};
|
|
3324
|
+
await ui5.table.sortColumnDescending("Amount", glAccountItemsTable);
|
|
3248
3325
|
```
|
|
3249
3326
|
<a name="ui5.table.clickSettingsButton"></a>
|
|
3250
3327
|
|
|
@@ -3258,7 +3335,14 @@ await ui5.table.clickSettingsButton();
|
|
|
3258
3335
|
```
|
|
3259
3336
|
**Example**
|
|
3260
3337
|
```js
|
|
3261
|
-
const glAccountItemsTable = {
|
|
3262
3338
|
"elementProperties": {
|
|
3263
3339
|
"viewName": "ui.s2p.mm.supplinvoice.manage.s1.view.S1",
|
|
3264
3340
|
"metadata": "sap.m.Table",
|
|
3265
3341
|
"id": "*idS2P.MM.MSI.TableGLAccountItems"
|
|
3266
3342
|
}
|
|
3343
|
+
const glAccountItemsTable = {
|
|
3344
|
+
"elementProperties": {
|
|
3345
|
+
"viewName": "ui.s2p.mm.supplinvoice.manage.s1.view.S1",
|
|
3346
|
+
"metadata": "sap.m.Table",
|
|
3347
|
+
"id": "*idS2P.MM.MSI.TableGLAccountItems"
|
|
3348
|
+
}
|
|
3349
|
+
};
|
|
3350
|
+
await ui5.table.clickSettingsButton(glAccountItemsTable);
|
|
3267
3351
|
```
|
|
3268
3352
|
<a name="ui5.userInteraction"></a>
|
|
3269
3353
|
|
|
@@ -3268,7 +3352,10 @@ const glAccountItemsTable = {
|
|
|
3268
3352
|
"elementProperties": {
|
|
3269
3353
|
"viewName": "ui.s2p.mm
|
|
3270
3354
|
* [.userInteraction](#ui5.userInteraction)
|
|
3271
3355
|
* [.click(selector, [index], [timeout])](#ui5.userInteraction.click)
|
|
3272
3356
|
* [.clickAndRetry(selector, [index], [timeout], [retries], [interval])](#ui5.userInteraction.clickAndRetry)
|
|
3357
|
+
* [.doubleClick(selector, [index], [timeout])](#ui5.userInteraction.doubleClick)
|
|
3358
|
+
* [.rightClick(selector, [index], [timeout])](#ui5.userInteraction.rightClick)
|
|
3273
3359
|
* [.clickTab(selector, [index], [timeout])](#ui5.userInteraction.clickTab)
|
|
3360
|
+
* [.selectFromTab(selector, value, [index], [timeout])](#ui5.userInteraction.selectFromTab)
|
|
3274
3361
|
* [.clickListItem(selector, [index], [timeout])](#ui5.userInteraction.clickListItem)
|
|
3275
3362
|
* [.fill(selector, value, [index], [timeout])](#ui5.userInteraction.fill)
|
|
3276
3363
|
* [.fillAndRetry(selector, value, [index], [timeout], [retries], [interval])](#ui5.userInteraction.fillAndRetry)
|
|
@@ -3290,8 +3377,6 @@ const glAccountItemsTable = {
|
|
|
3290
3377
|
"elementProperties": {
|
|
3291
3378
|
"viewName": "ui.s2p.mm
|
|
3292
3379
|
* [.openF4Help(selector, [index], [timeout], useF4Key)](#ui5.userInteraction.openF4Help)
|
|
3293
3380
|
* [.searchFor(selector, [index], [timeout], useEnter)](#ui5.userInteraction.searchFor)
|
|
3294
3381
|
* [.resetSearch(selector, [index], [timeout])](#ui5.userInteraction.resetSearch)
|
|
3295
|
-
* [.doubleClick(selector, [index], [timeout])](#ui5.userInteraction.doubleClick)
|
|
3296
|
-
* [.rightClick(selector, [index], [timeout])](#ui5.userInteraction.rightClick)
|
|
3297
3382
|
|
|
3298
3383
|
<a name="ui5.userInteraction.click"></a>
|
|
3299
3384
|
|
|
@@ -3329,10 +3414,46 @@ Clicks on the element with the given selector and retries the action in case of
|
|
|
3329
3414
|
```js
|
|
3330
3415
|
await ui5.userInteraction.clickAndRetry(selector);
|
|
3331
3416
|
```
|
|
3417
|
+
<a name="ui5.userInteraction.doubleClick"></a>
|
|
3418
|
+
|
|
3419
|
+
#### userInteraction.doubleClick(selector, [index], [timeout])
|
|
3420
|
+
Double Clicks on the passed element.
|
|
3421
|
+
|
|
3422
|
+
**Kind**: static method of [<code>userInteraction</code>](#ui5.userInteraction)
|
|
3423
|
+
|
|
3424
|
+
| Param | Type | Default | Description |
|
|
3425
|
+
| --- | --- | --- | --- |
|
|
3426
|
+
| selector | <code>Object</code> | | The selector describing the element. |
|
|
3427
|
+
| [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). |
|
|
3428
|
+
| [timeout] | <code>Number</code> | <code>30000</code> | The timeout to wait (ms). |
|
|
3429
|
+
|
|
3430
|
+
**Example**
|
|
3431
|
+
```js
|
|
3432
|
+
await ui5.userInteraction.doubleClick(selector);
|
|
3433
|
+
```
|
|
3434
|
+
<a name="ui5.userInteraction.rightClick"></a>
|
|
3435
|
+
|
|
3436
|
+
#### userInteraction.rightClick(selector, [index], [timeout])
|
|
3437
|
+
Right Clicks on the passed element.
|
|
3438
|
+
|
|
3439
|
+
**Kind**: static method of [<code>userInteraction</code>](#ui5.userInteraction)
|
|
3440
|
+
|
|
3441
|
+
| Param | Type | Default | Description |
|
|
3442
|
+
| --- | --- | --- | --- |
|
|
3443
|
+
| selector | <code>Object</code> | | The selector describing the element. |
|
|
3444
|
+
| [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). |
|
|
3445
|
+
| [timeout] | <code>Number</code> | <code>30000</code> | The timeout to wait (ms). |
|
|
3446
|
+
|
|
3447
|
+
**Example**
|
|
3448
|
+
```js
|
|
3449
|
+
const elem = await nonUi5.element.getById("button01");
|
|
3450
|
+
await ui5.userInteraction.rightClick(elem);
|
|
3451
|
+
```
|
|
3332
3452
|
<a name="ui5.userInteraction.clickTab"></a>
|
|
3333
3453
|
|
|
3334
3454
|
#### userInteraction.clickTab(selector, [index], [timeout])
|
|
3335
|
-
Clicks on the tab with the given selector and checks if the tab got selected successfully.
|
|
3455
|
+
Clicks on the tab with the given selector and checks if the tab got selected successfully.
|
|
3456
|
+
The function retries the click for maximal 3 times if the selection of the tab (blue underline) was not successful.
|
|
3336
3457
|
|
|
3337
3458
|
**Kind**: static method of [<code>userInteraction</code>](#ui5.userInteraction)
|
|
3338
3459
|
|
|
@@ -3346,10 +3467,31 @@ Clicks on the tab with the given selector and checks if the tab got selected suc
|
|
|
3346
3467
|
```js
|
|
3347
3468
|
await ui5.userInteraction.clickTab(selector);
|
|
3348
3469
|
```
|
|
3470
|
+
<a name="ui5.userInteraction.selectFromTab"></a>
|
|
3471
|
+
|
|
3472
|
+
#### userInteraction.selectFromTab(selector, value, [index], [timeout])
|
|
3473
|
+
Selects the passed value on the tab with the given selector and checks if the tab got selected successfully.
|
|
3474
|
+
The function retries the click for maximal 3 times if the selection of the tab (blue underline) was not successful.
|
|
3475
|
+
|
|
3476
|
+
**Kind**: static method of [<code>userInteraction</code>](#ui5.userInteraction)
|
|
3477
|
+
|
|
3478
|
+
| Param | Type | Default | Description |
|
|
3479
|
+
| --- | --- | --- | --- |
|
|
3480
|
+
| selector | <code>Object</code> | | The selector describing the element. |
|
|
3481
|
+
| value | <code>String</code> | | The value to select. |
|
|
3482
|
+
| [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). |
|
|
3483
|
+
| [timeout] | <code>Number</code> | <code>30000</code> | The timeout to wait (ms). |
|
|
3484
|
+
|
|
3485
|
+
**Example**
|
|
3486
|
+
```js
|
|
3487
|
+
await ui5.userInteraction.selectFromTab(selector);
|
|
3488
|
+
```
|
|
3349
3489
|
<a name="ui5.userInteraction.clickListItem"></a>
|
|
3350
3490
|
|
|
3351
3491
|
#### userInteraction.clickListItem(selector, [index], [timeout])
|
|
3352
|
-
Clicks or opens the list item with the given selector (e.g. ColumnListItem, StandardListItem).
|
|
3492
|
+
Clicks or opens the list item with the given selector (e.g. ColumnListItem, StandardListItem).
|
|
3493
|
+
In some cases the default click function is not working correctly (clicks an element within the list item).
|
|
3494
|
+
Therefore we recommend to use this function to open a specific list item.
|
|
3353
3495
|
|
|
3354
3496
|
**Kind**: static method of [<code>userInteraction</code>](#ui5.userInteraction)
|
|
3355
3497
|
|
|
@@ -3534,7 +3676,9 @@ await ui5.userInteraction.clearAndFillSmartFieldInputAndRetry(selector, "My Valu
|
|
|
3534
3676
|
<a name="ui5.userInteraction.selectBox"></a>
|
|
3535
3677
|
|
|
3536
3678
|
#### userInteraction.selectBox(selector, value, [index])
|
|
3537
|
-
Selects the passed value of the Select box.
|
|
3679
|
+
Selects the passed value of the Select box.
|
|
3680
|
+
Please note that the function will only work for the default select Box.
|
|
3681
|
+
In special cases, please use the clickSelectArrow function.
|
|
3538
3682
|
|
|
3539
3683
|
**Kind**: static method of [<code>userInteraction</code>](#ui5.userInteraction)
|
|
3540
3684
|
|
|
@@ -3551,7 +3695,9 @@ await ui5.userInteraction.selectBox(selector, "Germany");
|
|
|
3551
3695
|
<a name="ui5.userInteraction.selectComboBox"></a>
|
|
3552
3696
|
|
|
3553
3697
|
#### userInteraction.selectComboBox(selector, value, [index])
|
|
3554
|
-
Selects the passed value from the ComboBox with the given selector.
|
|
3698
|
+
Selects the passed value from the ComboBox with the given selector.
|
|
3699
|
+
Please note that the function will only work for the default ComboBox.
|
|
3700
|
+
In special cases you need to use the 'clickSelectArrow' function.
|
|
3555
3701
|
|
|
3556
3702
|
**Kind**: static method of [<code>userInteraction</code>](#ui5.userInteraction)
|
|
3557
3703
|
|
|
@@ -3568,7 +3714,9 @@ await ui5.userInteraction.selectComboBox(selector, "Germany");
|
|
|
3568
3714
|
<a name="ui5.userInteraction.selectMultiComboBox"></a>
|
|
3569
3715
|
|
|
3570
3716
|
#### userInteraction.selectMultiComboBox(selector, values, [index])
|
|
3571
|
-
Selects the passed values of the MultiComboBox with the given selector.
|
|
3717
|
+
Selects the passed values of the MultiComboBox with the given selector.
|
|
3718
|
+
Please note that the function will only work for the default MultiComboBox.
|
|
3719
|
+
In special cases, please use the clickSelectArrow function.
|
|
3572
3720
|
|
|
3573
3721
|
**Kind**: static method of [<code>userInteraction</code>](#ui5.userInteraction)
|
|
3574
3722
|
|
|
@@ -3693,7 +3841,8 @@ await ui5.userInteraction.openF4Help(selector, 0, 30000, false);
|
|
|
3693
3841
|
<a name="ui5.userInteraction.searchFor"></a>
|
|
3694
3842
|
|
|
3695
3843
|
#### userInteraction.searchFor(selector, [index], [timeout], useEnter)
|
|
3696
|
-
Searches for the passed value and executes the search.
|
|
3844
|
+
Searches for the passed value and executes the search.
|
|
3845
|
+
In case that the search is already filled, it will reset the field first.
|
|
3697
3846
|
|
|
3698
3847
|
**Kind**: static method of [<code>userInteraction</code>](#ui5.userInteraction)
|
|
3699
3848
|
|
|
@@ -3725,40 +3874,6 @@ Resets the search field.
|
|
|
3725
3874
|
```js
|
|
3726
3875
|
await ui5.userInteraction.resetSearch(selector);
|
|
3727
3876
|
```
|
|
3728
|
-
<a name="ui5.userInteraction.doubleClick"></a>
|
|
3729
|
-
|
|
3730
|
-
#### userInteraction.doubleClick(selector, [index], [timeout])
|
|
3731
|
-
Double Clicks on the passed element.
|
|
3732
|
-
|
|
3733
|
-
**Kind**: static method of [<code>userInteraction</code>](#ui5.userInteraction)
|
|
3734
|
-
|
|
3735
|
-
| Param | Type | Default | Description |
|
|
3736
|
-
| --- | --- | --- | --- |
|
|
3737
|
-
| selector | <code>Object</code> | | The selector describing the element. |
|
|
3738
|
-
| [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). |
|
|
3739
|
-
| [timeout] | <code>Number</code> | <code>30000</code> | The timeout to wait (ms). |
|
|
3740
|
-
|
|
3741
|
-
**Example**
|
|
3742
|
-
```js
|
|
3743
|
-
await ui5.userInteraction.doubleClick(selector);
|
|
3744
|
-
```
|
|
3745
|
-
<a name="ui5.userInteraction.rightClick"></a>
|
|
3746
|
-
|
|
3747
|
-
#### userInteraction.rightClick(selector, [index], [timeout])
|
|
3748
|
-
Right Clicks on the passed element.
|
|
3749
|
-
|
|
3750
|
-
**Kind**: static method of [<code>userInteraction</code>](#ui5.userInteraction)
|
|
3751
|
-
|
|
3752
|
-
| Param | Type | Default | Description |
|
|
3753
|
-
| --- | --- | --- | --- |
|
|
3754
|
-
| selector | <code>Object</code> | | The selector describing the element. |
|
|
3755
|
-
| [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). |
|
|
3756
|
-
| [timeout] | <code>Number</code> | <code>30000</code> | The timeout to wait (ms). |
|
|
3757
|
-
|
|
3758
|
-
**Example**
|
|
3759
|
-
```js
|
|
3760
|
-
const elem = await nonUi5.element.getById("button01");
|
|
3761
|
-
```
|
|
3762
3877
|
<a name="nonUi5"></a>
|
|
3763
3878
|
|
|
3764
3879
|
## nonUi5
|
|
@@ -3844,11 +3959,13 @@ Expects the attributes value of the passed element to be the compare value.
|
|
|
3844
3959
|
|
|
3845
3960
|
**Example**
|
|
3846
3961
|
```js
|
|
3847
|
-
const elem = await nonUi5.element.getById("button01");
|
|
3962
|
+
const elem = await nonUi5.element.getById("button01");
|
|
3963
|
+
await nonUi5.assertion.expectAttributeToBe(elem, "Save");
|
|
3848
3964
|
```
|
|
3849
3965
|
**Example**
|
|
3850
3966
|
```js
|
|
3851
|
-
const elem = await nonUi5.element.getById("button01");
|
|
3967
|
+
const elem = await nonUi5.element.getById("button01");
|
|
3968
|
+
await nonUi5.assertion.expectAttributeToBe(element, "Save", "title");
|
|
3852
3969
|
```
|
|
3853
3970
|
<a name="nonUi5.assertion.expectAttributeToContain"></a>
|
|
3854
3971
|
|
|
@@ -3865,7 +3982,8 @@ Expects the attributes value of the passed element to contain the compare value.
|
|
|
3865
3982
|
|
|
3866
3983
|
**Example**
|
|
3867
3984
|
```js
|
|
3868
|
-
const elem = await nonUi5.element.getById("button01");
|
|
3985
|
+
const elem = await nonUi5.element.getById("button01");
|
|
3986
|
+
await nonUi5.assertion.expectAttributeToContain(element, "Save", "title");
|
|
3869
3987
|
```
|
|
3870
3988
|
<a name="nonUi5.assertion.expectValueToBe"></a>
|
|
3871
3989
|
|
|
@@ -3881,7 +3999,8 @@ Expects the attributes value of the passed element to be the compare value.
|
|
|
3881
3999
|
|
|
3882
4000
|
**Example**
|
|
3883
4001
|
```js
|
|
3884
|
-
const elem = await nonUi5.element.getById("button01");
|
|
4002
|
+
const elem = await nonUi5.element.getById("button01");
|
|
4003
|
+
await nonUi5.assertion.expectValueToBe(elem, "Save");
|
|
3885
4004
|
```
|
|
3886
4005
|
<a name="nonUi5.assertion.expectToBeVisible"></a>
|
|
3887
4006
|
|
|
@@ -3896,7 +4015,8 @@ Expects that the element is visible to the user.
|
|
|
3896
4015
|
|
|
3897
4016
|
**Example**
|
|
3898
4017
|
```js
|
|
3899
|
-
const elem = await nonUi5.element.getById("button01");
|
|
4018
|
+
const elem = await nonUi5.element.getById("button01");
|
|
4019
|
+
await nonUi5.assertion.expectToBeVisible(elem);
|
|
3900
4020
|
```
|
|
3901
4021
|
<a name="nonUi5.assertion.expectToBeNotVisible"></a>
|
|
3902
4022
|
|
|
@@ -3912,7 +4032,8 @@ Expects that the element is not visible to the user.
|
|
|
3912
4032
|
|
|
3913
4033
|
**Example**
|
|
3914
4034
|
```js
|
|
3915
|
-
const elem = await nonUi5.element.getById("button01");
|
|
4035
|
+
const elem = await nonUi5.element.getById("button01");
|
|
4036
|
+
await nonUi5.assertion.expectToBeNotVisible(elem, 5000);
|
|
3916
4037
|
```
|
|
3917
4038
|
<a name="nonUi5.element"></a>
|
|
3918
4039
|
|
|
@@ -4064,7 +4185,9 @@ Returns all elements found by the given selector despite visible or not.
|
|
|
4064
4185
|
|
|
4065
4186
|
**Example**
|
|
4066
4187
|
```js
|
|
4067
|
-
const hiddenElements = await nonUi5.element.getAll(".sapUiInvisibleText");
|
|
4188
|
+
const hiddenElements = await nonUi5.element.getAll(".sapUiInvisibleText");
|
|
4189
|
+
const isPresent = await nonUi5.element.isPresent(hiddenElements[0]);
|
|
4190
|
+
await common.assertion.expectTrue(isPresent);
|
|
4068
4191
|
```
|
|
4069
4192
|
<a name="nonUi5.element.getByCss"></a>
|
|
4070
4193
|
|
|
@@ -4141,7 +4264,8 @@ Gets the element with the given class.
|
|
|
4141
4264
|
|
|
4142
4265
|
**Example**
|
|
4143
4266
|
```js
|
|
4144
|
-
const elem = await nonUi5.element.getByClass("button01");
|
|
4267
|
+
const elem = await nonUi5.element.getByClass("button01");
|
|
4268
|
+
const elem = await nonUi5.element.getByClass("sapMIBar sapMTB sapMTBNewFlex sapContrastPlus");
|
|
4145
4269
|
```
|
|
4146
4270
|
<a name="nonUi5.element.getByName"></a>
|
|
4147
4271
|
|
|
@@ -4236,7 +4360,8 @@ Returns a boolean if the element is visible to the user.
|
|
|
4236
4360
|
|
|
4237
4361
|
**Example**
|
|
4238
4362
|
```js
|
|
4239
|
-
const elem = await nonUi5.element.getById("button01");
|
|
4363
|
+
const elem = await nonUi5.element.getById("button01");
|
|
4364
|
+
await nonUi5.element.isVisible(elem);
|
|
4240
4365
|
```
|
|
4241
4366
|
<a name="nonUi5.element.isPresent"></a>
|
|
4242
4367
|
|
|
@@ -4252,7 +4377,8 @@ Returns a boolean if the element is present at the DOM or not. It might be hidde
|
|
|
4252
4377
|
|
|
4253
4378
|
**Example**
|
|
4254
4379
|
```js
|
|
4255
|
-
const elem = await nonUi5.element.getById("button01");
|
|
4380
|
+
const elem = await nonUi5.element.getById("button01");
|
|
4381
|
+
await nonUi5.element.isPresent(elem);
|
|
4256
4382
|
```
|
|
4257
4383
|
<a name="nonUi5.element.isPresentByCss"></a>
|
|
4258
4384
|
|
|
@@ -4304,11 +4430,13 @@ Returns the attributes value of the passed element.
|
|
|
4304
4430
|
|
|
4305
4431
|
**Example**
|
|
4306
4432
|
```js
|
|
4307
|
-
const elem = await nonUi5.element.getById("elem01");
|
|
4433
|
+
const elem = await nonUi5.element.getById("elem01");
|
|
4434
|
+
const text = await nonUi5.element.getAttributeValue(elem, "text");
|
|
4308
4435
|
```
|
|
4309
4436
|
**Example**
|
|
4310
4437
|
```js
|
|
4311
|
-
const elem = await nonUi5.element.getById("elem02");
|
|
4438
|
+
const elem = await nonUi5.element.getById("elem02");
|
|
4439
|
+
const innerHTML = await nonUi5.element.getAttributeValue(elem);
|
|
4312
4440
|
```
|
|
4313
4441
|
<a name="nonUi5.element.getValue"></a>
|
|
4314
4442
|
|
|
@@ -4324,12 +4452,14 @@ Returns the value of the passed element.
|
|
|
4324
4452
|
|
|
4325
4453
|
**Example**
|
|
4326
4454
|
```js
|
|
4327
|
-
const elem = await nonUi5.element.getById("elem02");
|
|
4455
|
+
const elem = await nonUi5.element.getById("elem02");
|
|
4456
|
+
const innerHTML = await nonUi5.element.getValue(elem);
|
|
4328
4457
|
```
|
|
4329
4458
|
<a name="nonUi5.element.setInnerHTML"></a>
|
|
4330
4459
|
|
|
4331
4460
|
#### element.setInnerHTML(elem) ⇒ <code>String</code>
|
|
4332
|
-
Sets the innerHTML value of the given element.
|
|
4461
|
+
Sets the innerHTML value of the given element.
|
|
4462
|
+
CAUTION: Only use this if filling the value in the normal way is not working and if it is unavoidable. Keep in mind, that a user is not able to perform such actions.
|
|
4333
4463
|
|
|
4334
4464
|
**Kind**: static method of [<code>element</code>](#nonUi5.element)
|
|
4335
4465
|
**Returns**: <code>String</code> - The value to set.
|
|
@@ -4340,7 +4470,8 @@ Sets the innerHTML value of the given element.
|
|
|
4340
4470
|
|
|
4341
4471
|
**Example**
|
|
4342
4472
|
```js
|
|
4343
|
-
const elem = await nonUi5.element.getById("text-editor");
|
|
4473
|
+
const elem = await nonUi5.element.getById("text-editor");
|
|
4474
|
+
await nonUi5.element.setInnerHTML(elem, "Hello World!");
|
|
4344
4475
|
```
|
|
4345
4476
|
<a name="nonUi5.element.highlight"></a>
|
|
4346
4477
|
|
|
@@ -4357,11 +4488,13 @@ Highlights the passed element.
|
|
|
4357
4488
|
|
|
4358
4489
|
**Example**
|
|
4359
4490
|
```js
|
|
4360
|
-
const elem = await nonUi5.element.getById("text01");
|
|
4491
|
+
const elem = await nonUi5.element.getById("text01");
|
|
4492
|
+
await nonUi5.element.highlight(elem);
|
|
4361
4493
|
```
|
|
4362
4494
|
**Example**
|
|
4363
4495
|
```js
|
|
4364
|
-
const elem = await nonUi5.element.getById("text01");
|
|
4496
|
+
const elem = await nonUi5.element.getById("text01");
|
|
4497
|
+
await nonUi5.element.highlight(elem, 3000, "green");
|
|
4365
4498
|
```
|
|
4366
4499
|
<a name="nonUi5.element.switchToIframe"></a>
|
|
4367
4500
|
|
|
@@ -4450,7 +4583,8 @@ Clicks on the passed element.
|
|
|
4450
4583
|
|
|
4451
4584
|
**Example**
|
|
4452
4585
|
```js
|
|
4453
|
-
const elem = await nonUi5.element.getById("button01");
|
|
4586
|
+
const elem = await nonUi5.element.getById("button01");
|
|
4587
|
+
await nonUi5.userInteraction.click(elem);
|
|
4454
4588
|
```
|
|
4455
4589
|
<a name="nonUi5.userInteraction.clickAndRetry"></a>
|
|
4456
4590
|
|
|
@@ -4468,7 +4602,8 @@ Clicks on the passed element, retries in case it fails.
|
|
|
4468
4602
|
|
|
4469
4603
|
**Example**
|
|
4470
4604
|
```js
|
|
4471
|
-
const elem = await nonUi5.element.getById("button01");
|
|
4605
|
+
const elem = await nonUi5.element.getById("button01");
|
|
4606
|
+
await nonUi5.userInteraction.clickAndRetry(elem);
|
|
4472
4607
|
```
|
|
4473
4608
|
<a name="nonUi5.userInteraction.doubleClick"></a>
|
|
4474
4609
|
|
|
@@ -4484,7 +4619,8 @@ Double Clicks on the passed element.
|
|
|
4484
4619
|
|
|
4485
4620
|
**Example**
|
|
4486
4621
|
```js
|
|
4487
|
-
const elem = await nonUi5.element.getById("button01");
|
|
4622
|
+
const elem = await nonUi5.element.getById("button01");
|
|
4623
|
+
await nonUi5.userInteraction.doubleClick(elem);
|
|
4488
4624
|
```
|
|
4489
4625
|
<a name="nonUi5.userInteraction.rightClick"></a>
|
|
4490
4626
|
|
|
@@ -4500,7 +4636,8 @@ Right Clicks on the passed element.
|
|
|
4500
4636
|
|
|
4501
4637
|
**Example**
|
|
4502
4638
|
```js
|
|
4503
|
-
const elem = await nonUi5.element.getById("button01");
|
|
4639
|
+
const elem = await nonUi5.element.getById("button01");
|
|
4640
|
+
await nonUi5.userInteraction.rightClick(elem);
|
|
4504
4641
|
```
|
|
4505
4642
|
<a name="nonUi5.userInteraction.fill"></a>
|
|
4506
4643
|
|
|
@@ -4516,7 +4653,8 @@ Fills the given value into the passed input.
|
|
|
4516
4653
|
|
|
4517
4654
|
**Example**
|
|
4518
4655
|
```js
|
|
4519
|
-
const elem = await nonUi5.element.getById("input01");
|
|
4656
|
+
const elem = await nonUi5.element.getById("input01");
|
|
4657
|
+
await nonUi5.userInteraction.fill(elem, "Service 01");
|
|
4520
4658
|
```
|
|
4521
4659
|
<a name="nonUi5.userInteraction.fillAndRetry"></a>
|
|
4522
4660
|
|
|
@@ -4534,7 +4672,8 @@ Fills the given value into the passed input, retries in case of a failure.
|
|
|
4534
4672
|
|
|
4535
4673
|
**Example**
|
|
4536
4674
|
```js
|
|
4537
|
-
const elem = await nonUi5.element.getById("input01");
|
|
4675
|
+
const elem = await nonUi5.element.getById("input01");
|
|
4676
|
+
await nonUi5.userInteraction.fillAndRetry(elem, "Service 01");
|
|
4538
4677
|
```
|
|
4539
4678
|
<a name="nonUi5.userInteraction.clear"></a>
|
|
4540
4679
|
|
|
@@ -4549,7 +4688,8 @@ Clears the passed input element.
|
|
|
4549
4688
|
|
|
4550
4689
|
**Example**
|
|
4551
4690
|
```js
|
|
4552
|
-
const elem = await nonUi5.element.getById("input01");
|
|
4691
|
+
const elem = await nonUi5.element.getById("input01");
|
|
4692
|
+
await nonUi5.userInteraction.clear(elem);
|
|
4553
4693
|
```
|
|
4554
4694
|
<a name="nonUi5.userInteraction.clearAndRetry"></a>
|
|
4555
4695
|
|
|
@@ -4566,7 +4706,8 @@ Clears the passed input element, retries in case of a failure.
|
|
|
4566
4706
|
|
|
4567
4707
|
**Example**
|
|
4568
4708
|
```js
|
|
4569
|
-
const elem = await nonUi5.element.getById("input01", 10000);
|
|
4709
|
+
const elem = await nonUi5.element.getById("input01", 10000);
|
|
4710
|
+
await nonUi5.userInteraction.clearAndRetry(elem);
|
|
4570
4711
|
```
|
|
4571
4712
|
<a name="nonUi5.userInteraction.clearAndFill"></a>
|
|
4572
4713
|
|
|
@@ -4582,7 +4723,8 @@ Clears and fills the passed input element.
|
|
|
4582
4723
|
|
|
4583
4724
|
**Example**
|
|
4584
4725
|
```js
|
|
4585
|
-
const elem = await nonUi5.element.getById("input01");
|
|
4726
|
+
const elem = await nonUi5.element.getById("input01");
|
|
4727
|
+
await nonUi5.userInteraction.clearAndFill(elem, "Service 01");
|
|
4586
4728
|
```
|
|
4587
4729
|
<a name="nonUi5.userInteraction.clearAndFillAndRetry"></a>
|
|
4588
4730
|
|
|
@@ -4601,7 +4743,8 @@ Clears and fills the passed input, retries in case it fails.
|
|
|
4601
4743
|
|
|
4602
4744
|
**Example**
|
|
4603
4745
|
```js
|
|
4604
|
-
const elem = await nonUi5.element.getById("input01");
|
|
4746
|
+
const elem = await nonUi5.element.getById("input01");
|
|
4747
|
+
await nonUi5.userInteraction.clearAndFillAndRetry(elem, "Service 01");
|
|
4605
4748
|
```
|
|
4606
4749
|
<a name="nonUi5.userInteraction.mouseOverElement"></a>
|
|
4607
4750
|
|
|
@@ -4618,7 +4761,8 @@ Moves the cursor/focus to the passed element.
|
|
|
4618
4761
|
|
|
4619
4762
|
**Example**
|
|
4620
4763
|
```js
|
|
4621
|
-
const elem = await nonUi5.element.getById("dropdown42");
|
|
4764
|
+
const elem = await nonUi5.element.getById("dropdown42");
|
|
4765
|
+
await nonUi5.userInteraction.mouseOverElement(elem);
|
|
4622
4766
|
```
|
|
4623
4767
|
<a name="nonUi5.userInteraction.scrollToElement"></a>
|
|
4624
4768
|
|
|
@@ -4634,7 +4778,8 @@ Scrolls to the passed element to get it into view.
|
|
|
4634
4778
|
|
|
4635
4779
|
**Example**
|
|
4636
4780
|
```js
|
|
4637
|
-
const elem = await nonUi5.userInteraction.getElementById("footer01");
|
|
4781
|
+
const elem = await nonUi5.userInteraction.getElementById("footer01");
|
|
4782
|
+
await nonUi5.userInteraction.scrollToElement(elem);
|
|
4638
4783
|
```
|
|
4639
4784
|
<a name="nonUi5.userInteraction.dragAndDrop"></a>
|
|
4640
4785
|
|
|
@@ -4654,7 +4799,8 @@ const elem = await nonUi5.element.getById("drag01");
|
|
|
4654
4799
|
```
|
|
4655
4800
|
**Example**
|
|
4656
4801
|
```js
|
|
4657
|
-
const targetElem = await nonUi5.element.getById("drop02");
|
|
4802
|
+
const targetElem = await nonUi5.element.getById("drop02");
|
|
4803
|
+
await nonUi5.userInteraction.dragAndDrop(elem, targetElem);
|
|
4658
4804
|
```
|
|
4659
4805
|
<a name="nonUi5.userInteraction.moveCursorAndClick"></a>
|
|
4660
4806
|
|
|
@@ -4669,7 +4815,8 @@ Moves the cursor to the target element and clicks on it. Can be used for charts.
|
|
|
4669
4815
|
|
|
4670
4816
|
**Example**
|
|
4671
4817
|
```js
|
|
4672
|
-
const elem = await nonUi5.element.getById("chartPartToClick");
|
|
4818
|
+
const elem = await nonUi5.element.getById("chartPartToClick");
|
|
4819
|
+
await nonUi5.userInteraction.moveCursorAndClick(elem);
|
|
4673
4820
|
```
|
|
4674
4821
|
<a name="nonUi5.userInteraction.clickElementInSvg"></a>
|
|
4675
4822
|
|
|
@@ -4685,7 +4832,9 @@ Clicks on an inner element within a SVG element.
|
|
|
4685
4832
|
|
|
4686
4833
|
**Example**
|
|
4687
4834
|
```js
|
|
4688
|
-
const svgElem = await nonUi5.element.getByCss("svg");
|
|
4835
|
+
const svgElem = await nonUi5.element.getByCss("svg");
|
|
4836
|
+
const innerSelector = "circle:nth-child(6)";
|
|
4837
|
+
await nonUi5.userInteraction.clickElementInSvg(svgElem, innerSelector);
|
|
4689
4838
|
```
|
|
4690
4839
|
<a name="service"></a>
|
|
4691
4840
|
|
|
@@ -4733,7 +4882,9 @@ Global namespace for service modules.
|
|
|
4733
4882
|
<a name="service.odata.init"></a>
|
|
4734
4883
|
|
|
4735
4884
|
#### odata.init(url, username, password, [loggingEnabled], [params], [authType]) ⇒ <code>Object</code>
|
|
4736
|
-
Initializes The service to work with.
|
|
4885
|
+
Initializes The service to work with.
|
|
4886
|
+
XCSRF-Token will be automatically fetched and stored in the service instance.
|
|
4887
|
+
Cookies will also automatically assembled and stored in the service instance.
|
|
4737
4888
|
|
|
4738
4889
|
**Kind**: static method of [<code>odata</code>](#service.odata)
|
|
4739
4890
|
**Returns**: <code>Object</code> - The initialized service object.
|
|
@@ -4749,7 +4900,12 @@ Initializes The service to work with.
|
|
|
4749
4900
|
|
|
4750
4901
|
**Example**
|
|
4751
4902
|
```js
|
|
4752
|
-
const url = "https://hbr-715.wdf.sap.corp/sap/opu/odata/sap/API_PURCHASEORDER_PROCESS_SRV/";
|
|
4753
4903
|
"saml2": "disabled",
|
|
4754
4904
|
"language": "de"
|
|
4905
|
+
const url = "<urlToSystem>/sap/opu/odata/sap/API_PURCHASEORDER_PROCESS_SRV/";
|
|
4906
|
+
const params = {
|
|
4907
|
+
"saml2": "disabled",
|
|
4908
|
+
"language": "de"
|
|
4909
|
+
}
|
|
4910
|
+
srv = await service.odata.init(url, user, password, false, params);
|
|
4755
4911
|
```
|
|
4756
4912
|
<a name="service.odata.get"></a>
|
|
4757
4913
|
|
|
@@ -4766,7 +4922,12 @@ makes a GET request.
|
|
|
4766
4922
|
|
|
4767
4923
|
**Example**
|
|
4768
4924
|
```js
|
|
4769
|
-
const url = "https://qs9-715.wdf.sap.corp/sap/opu/odata/sap/API_PURCHASEORDER_PROCESS_SRV/";
|
|
4770
4925
|
PurchaseOrder: "4100000000"
|
|
4926
|
+
const url = "<baseUrl>/sap/opu/odata/sap/API_PURCHASEORDER_PROCESS_SRV/";
|
|
4927
|
+
srv = await service.odata.init(url, user, password);
|
|
4928
|
+
const keys = {
|
|
4929
|
+
PurchaseOrder: "4100000000"
|
|
4930
|
+
};
|
|
4931
|
+
const res = await service.odata.get(srv, "A_PurchaseOrder", keys);
|
|
4771
4932
|
```
|
|
4772
4933
|
<a name="service.odata.getEntitySet"></a>
|
|
4773
4934
|
|
|
@@ -4786,7 +4947,20 @@ GET's the EntitySet collection.
|
|
|
4786
4947
|
|
|
4787
4948
|
**Example**
|
|
4788
4949
|
```js
|
|
4789
|
-
const url = "https://qs9-715.wdf.sap.corp/sap/opu/odata/sap/API_PURCHASEORDER_PROCESS_SRV/";
|
|
4790
4950
|
"$top" : 5,
|
|
4791
4951
|
"$skip" : 10,
|
|
4952
|
+
const url = "<baseUrl>/sap/opu/odata/sap/API_PURCHASEORDER_PROCESS_SRV/";
|
|
4953
|
+
srv = await service.odata.init(url, user, password);
|
|
4954
|
+
|
|
4955
|
+
let filterString = "Status eq '01'";
|
|
4956
|
+
let res = await service.odata.getEntitySet(srv, "A_PurchaseOrder", filterString);
|
|
4957
|
+
|
|
4958
|
+
let select = "CentralPurchaseContract,PurchasingProcessingStatus" ;
|
|
4959
|
+
let res = await service.odata.getEntitySet(srv, "A_PurchaseOrder", filterString, select);
|
|
4960
|
+
|
|
4961
|
+
let queryParams = {
|
|
4962
|
+
"$top" : 5,
|
|
4963
|
+
"$skip" : 10,
|
|
4964
|
+
};
|
|
4965
|
+
let res = await service.odata.getEntitySet(srv, "A_PurchaseOrder", filterString, select, queryParams);
|
|
4792
4966
|
```
|
|
4793
4967
|
<a name="service.odata.isFeatureToggleActivated"></a>
|
|
4794
4968
|
|
|
@@ -4802,7 +4976,9 @@ checks if a feature toggle is switched on or off
|
|
|
4802
4976
|
|
|
4803
4977
|
**Example**
|
|
4804
4978
|
```js
|
|
4805
|
-
const url = browser.params.systemUrl + "/sap/opu/odata/SAP/CA_FM_FEATURE_TOGGLE_STATUS_SRV/";
|
|
4979
|
+
const url = browser.params.systemUrl + "/sap/opu/odata/SAP/CA_FM_FEATURE_TOGGLE_STATUS_SRV/";
|
|
4980
|
+
const srv = await service.odata.init(url, user, password);
|
|
4981
|
+
let isFeatureActive = await service.odata.isFeatureToggleActivated(srv, "MM_PUR_PO_BATCHES_IN_MANAGE_PO");
|
|
4806
4982
|
```
|
|
4807
4983
|
<a name="service.odata.post"></a>
|
|
4808
4984
|
|
|
@@ -4819,7 +4995,12 @@ makes a POST request.
|
|
|
4819
4995
|
|
|
4820
4996
|
**Example**
|
|
4821
4997
|
```js
|
|
4822
|
-
let payload = {
|
|
4823
4998
|
"PurchaseOrder": "4500007108",
|
|
4824
4999
|
"DraftUUID": "00000000-0000-0000-0000-000000000000",
|
|
4825
5000
|
"IsActiveEntity": "true"
|
|
5001
|
+
let payload = {
|
|
5002
|
+
"PurchaseOrder": "4500007108",
|
|
5003
|
+
"DraftUUID": "00000000-0000-0000-0000-000000000000",
|
|
5004
|
+
"IsActiveEntity": "true"
|
|
5005
|
+
};
|
|
5006
|
+
let res = await service.odata.post(srv, "A_PurchaseOrder", payload);
|
|
4826
5007
|
```
|
|
4827
5008
|
<a name="service.odata.merge"></a>
|
|
4828
5009
|
|
|
@@ -4836,7 +5017,12 @@ makes a MERGE request.
|
|
|
4836
5017
|
|
|
4837
5018
|
**Example**
|
|
4838
5019
|
```js
|
|
4839
|
-
let res = await service.odata.merge(srv, "A_PurchaseOrderScheduleLine", {
|
|
4840
5020
|
"PurchasingDocument": "4500007108",
|
|
4841
5021
|
"PurchasingDocumentItem": "10",
|
|
4842
5022
|
"ScheduleLine": "1",
|
|
4843
5023
|
"ScheduleLineDeliveryDate": new Date()
|
|
5024
|
+
let res = await service.odata.merge(srv, "A_PurchaseOrderScheduleLine", {
|
|
5025
|
+
"PurchasingDocument": "4500007108",
|
|
5026
|
+
"PurchasingDocumentItem": "10",
|
|
5027
|
+
"ScheduleLine": "1",
|
|
5028
|
+
"ScheduleLineDeliveryDate": new Date()
|
|
5029
|
+
};
|
|
4844
5030
|
```
|
|
4845
5031
|
<a name="service.odata.delete"></a>
|
|
4846
5032
|
|
|
@@ -4853,7 +5039,12 @@ makes a DELETE request.
|
|
|
4853
5039
|
|
|
4854
5040
|
**Example**
|
|
4855
5041
|
```js
|
|
4856
|
-
let options = {
|
|
4857
5042
|
"PurchaseOrder": "",
|
|
4858
5043
|
"DraftUUID": draftUUID,
|
|
4859
5044
|
"IsActiveEntity": false
|
|
5045
|
+
let options = {
|
|
5046
|
+
"PurchaseOrder": "",
|
|
5047
|
+
"DraftUUID": draftUUID,
|
|
5048
|
+
"IsActiveEntity": false
|
|
5049
|
+
};
|
|
5050
|
+
await service.odata.delete(srv, "C_PurchaseOrderTP", options);
|
|
4860
5051
|
```
|
|
4861
5052
|
<a name="service.odata.callFunctionImport"></a>
|
|
4862
5053
|
|
|
@@ -4870,7 +5061,11 @@ makes a function import request on an OData service.
|
|
|
4870
5061
|
|
|
4871
5062
|
**Example**
|
|
4872
5063
|
```js
|
|
4873
|
-
const options = {
|
|
4874
5064
|
CentralRequestForQuotation : "7500000026",
|
|
4875
5065
|
Supplier : "100006"
|
|
5066
|
+
const options = {
|
|
5067
|
+
CentralRequestForQuotation : "7500000026",
|
|
5068
|
+
Supplier : "100006"
|
|
5069
|
+
};
|
|
5070
|
+
const res = await service.odata.callFunctionImport(srv, "Cancel", options);
|
|
4876
5071
|
```
|
|
4877
5072
|
<a name="service.odata.getOutputManagementPdfStream"></a>
|
|
4878
5073
|
|
|
@@ -4888,7 +5083,12 @@ returns a stream of output management pdf file.
|
|
|
4888
5083
|
|
|
4889
5084
|
**Example**
|
|
4890
5085
|
```js
|
|
4891
|
-
const outputConf =
|
|
4892
5086
|
ApplObjectType: "REQUEST_FOR_QUOTATION",
|
|
4893
5087
|
ApplObjectId: "7000002653",
|
|
4894
5088
|
ItemId: "1"
|
|
5089
|
+
const outputConf =
|
|
5090
|
+
ApplObjectType: "REQUEST_FOR_QUOTATION",
|
|
5091
|
+
ApplObjectId: "7000002653",
|
|
5092
|
+
ItemId: "1"
|
|
5093
|
+
};
|
|
5094
|
+
const pdfStream = await service.odata.getOutputManagementPdfStream(outputConf, url, user, password);
|
|
4895
5095
|
```
|
|
4896
5096
|
<a name="service.odata.readPdfFromDirectUrl"></a>
|
|
4897
5097
|
|
|
@@ -4906,7 +5106,8 @@ returns a stream of pdf file which is part of attachment.
|
|
|
4906
5106
|
|
|
4907
5107
|
**Example**
|
|
4908
5108
|
```js
|
|
4909
|
-
const url = "https://domain.com/getPdfFile";
|
|
5109
|
+
const url = "https://domain.com/getPdfFile";
|
|
5110
|
+
const pdfStream = await service.odata.readPdfFromDirectUrl(url, "username", "Password");
|
|
4910
5111
|
```
|
|
4911
5112
|
<a name="service.rest"></a>
|
|
4912
5113
|
|
|
@@ -4934,12 +5135,13 @@ Returns an axios instance for custom axios handling.
|
|
|
4934
5135
|
|
|
4935
5136
|
**Example**
|
|
4936
5137
|
```js
|
|
4937
|
-
const customConfig = {
|
|
4938
|
-
baseURL: 'https://some-domain.com/api/',
|
|
4939
|
-
timeout: 1000,
|
|
4940
|
-
headers: {
|
|
4941
|
-
'X-Custom-Header': 'foobar'
|
|
4942
|
-
}
|
|
5138
|
+
const customConfig = {
|
|
5139
|
+
baseURL: 'https://some-domain.com/api/',
|
|
5140
|
+
timeout: 1000,
|
|
5141
|
+
headers: {
|
|
5142
|
+
'X-Custom-Header': 'foobar'
|
|
5143
|
+
}
|
|
5144
|
+
const axios = service.rest.init(customConfig);
|
|
4943
5145
|
```
|
|
4944
5146
|
<a name="service.rest.get"></a>
|
|
4945
5147
|
|
|
@@ -4956,7 +5158,8 @@ makes a GET request.
|
|
|
4956
5158
|
|
|
4957
5159
|
**Example**
|
|
4958
5160
|
```js
|
|
4959
|
-
const uri = https://api.predic8.de/shop/products/";
|
|
5161
|
+
const uri = https://api.predic8.de/shop/products/";
|
|
5162
|
+
let res = await service.rest.get(uri);
|
|
4960
5163
|
```
|
|
4961
5164
|
<a name="service.rest.post"></a>
|
|
4962
5165
|
|