@qavajs/cypress 2.5.0 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -0
- package/lib/memory.js +15 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/lib/memory.js
CHANGED
|
@@ -3,9 +3,9 @@ import { dataTable2Object } from './utils';
|
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Save text of element to memory
|
|
6
|
-
* @param {string} alias - element to get
|
|
6
|
+
* @param {string} alias - element to get text
|
|
7
7
|
* @param {string} key - key to store value
|
|
8
|
-
* @example I save text of '
|
|
8
|
+
* @example I save text of 'Search Result' as 'firstSearchResult'
|
|
9
9
|
*/
|
|
10
10
|
When('I save text of {locator} as {value}', function (locator, key) {
|
|
11
11
|
locator.then(e => {
|
|
@@ -13,6 +13,19 @@ When('I save text of {locator} as {value}', function (locator, key) {
|
|
|
13
13
|
});
|
|
14
14
|
});
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* Save value of element to memory
|
|
18
|
+
* @param {string} alias - element to get value
|
|
19
|
+
* @param {string} key - key to store value
|
|
20
|
+
* @example I save value of 'Search Input' as 'searchInput'
|
|
21
|
+
*/
|
|
22
|
+
When('I save value of {locator} as {value}', function (locator, key) {
|
|
23
|
+
locator.then(e => {
|
|
24
|
+
key.set(e.val());
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
|
|
16
29
|
/**
|
|
17
30
|
* Save property of element to memory
|
|
18
31
|
* @param {string} property - property to store
|