froth-webdriverio-framework 1.0.22 → 1.0.24
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/config/setallDatailinBuffer.js +0 -3
- package/mobile/commonMethods/Utils.js +42 -40
- package/mobile/commonMethods/scrollDownToView.js +2 -2
- package/mobile/commonMethods/scrollRightToView.js +2 -2
- package/mobile/commonMethods/scrollToBeginning.js +2 -2
- package/mobile/commonMethods/scrollToEnd.js +3 -2
- package/mobile/commonMethods/scrollToLeft.js +2 -2
- package/mobile/commonMethods/scrollToRight.js +2 -2
- package/package.json +1 -1
|
@@ -1,44 +1,46 @@
|
|
|
1
1
|
// This file contains the common methods that are used in the test scripts
|
|
2
|
-
let
|
|
3
|
-
let
|
|
4
|
-
let
|
|
5
|
-
let
|
|
6
|
-
let
|
|
7
|
-
let
|
|
8
|
-
let
|
|
9
|
-
let
|
|
10
|
-
let verifyText= null;
|
|
2
|
+
let scrollToEnd = null;
|
|
3
|
+
let clickIfVisible = null;
|
|
4
|
+
let verifyTextInFieldAttribute = null;
|
|
5
|
+
let scrollToBeginning = null;
|
|
6
|
+
let scrollToLeft = null;
|
|
7
|
+
let scrollToRight = null;
|
|
8
|
+
let scrollDownToView = null;
|
|
9
|
+
let scrollRightToView = null;
|
|
10
|
+
let verifyText = null;
|
|
11
|
+
|
|
12
|
+
if (process.env.LOCATION == 'local') {
|
|
13
|
+
|
|
14
|
+
scrollToEnd = require("./scrollToEnd");
|
|
15
|
+
clickIfVisible = require("./clickIfVisible");
|
|
16
|
+
verifyTextInFieldAttribute = require('./verifyTextInFieldAttribute');
|
|
17
|
+
scrollToBeginning = require('./scrollToBeginning');
|
|
18
|
+
scrollToLeft = require('./scrollToLeft');
|
|
19
|
+
scrollToRight = require('./scrollToRight');
|
|
20
|
+
scrollDownToView = require('./scrollDownToView');
|
|
21
|
+
scrollRightToView = require('./scrollRightToView');
|
|
22
|
+
verifyText = require('./verifyText');
|
|
23
|
+
} else {
|
|
24
|
+
scrollToEnd = require('froth-webdriverio-framework/mobile/commonMethods/scrollToEnd');
|
|
25
|
+
clickIfVisible = require('froth-webdriverio-framework/mobile/commonMethods/clickIfVisible');
|
|
26
|
+
verifyTextInFieldAttribute = require('froth-webdriverio-framework/mobile/commonMethods/verifyTextInFieldAttribute');
|
|
27
|
+
scrollToBeginning = require('froth-webdriverio-framework/mobile/commonMethods/scrollToBeginning');
|
|
28
|
+
scrollToLeft = require('froth-webdriverio-framework/mobile/commonMethods/scrollToLeft');
|
|
29
|
+
scrollToRight = require('froth-webdriverio-framework/mobile/commonMethods/scrollToRight');
|
|
30
|
+
scrollDownToView = require('froth-webdriverio-framework/mobile/commonMethods/scrollDownToView');
|
|
31
|
+
scrollRightToView = require('froth-webdriverio-framework/mobile/commonMethods/scrollRightToView');
|
|
32
|
+
verifyText = require('froth-webdriverio-framework/mobile/commonMethods/verifyText');
|
|
33
|
+
}
|
|
34
|
+
//export the variabels
|
|
11
35
|
|
|
12
|
-
//if(process.env.LOCATION == 'local'){
|
|
13
|
-
ScrollToEnd = require('./ScrollToEnd');
|
|
14
|
-
ClickIfVisible= require('./clickIfVisible');
|
|
15
|
-
VerifyTextInFieldAttribute= require('./verifyTextInFieldAttribute');
|
|
16
|
-
ScrollToBeginning = require('./scrollToBeginning');
|
|
17
|
-
ScrollToLeft = require('./scrollToLeft');
|
|
18
|
-
ScrollToRight = require('./scrollToRight');
|
|
19
|
-
ScrollDownToView= require('./ScrollDownToView');
|
|
20
|
-
ScrollRightToView= require('./ScrollRightToView');
|
|
21
|
-
verifyText= require('./verifyText');
|
|
22
|
-
// }else{
|
|
23
|
-
// ScrollToEnd = require('froth-webdriverio-framework/mobile/commonMethods/scrollToEnd');
|
|
24
|
-
// ClickIfVisible= require('froth-webdriverio-framework/mobile/commonMethods/clickIfVisible');
|
|
25
|
-
// VerifyTextInFieldAttribute= require('froth-webdriverio-framework/mobile/commonMethods/verifyTextInFieldAttribute');
|
|
26
|
-
// ScrollToBeginning = require('froth-webdriverio-framework/mobile/commonMethods/scrollToBeginning');
|
|
27
|
-
// ScrollToLeft = require('froth-webdriverio-framework/mobile/commonMethods/scrollToLeft');
|
|
28
|
-
// ScrollToRight = require('froth-webdriverio-framework/mobile/commonMethods/scrollToRight');
|
|
29
|
-
// ScrollDownToView= require('froth-webdriverio-framework/mobile/commonMethods/scrollDownToView');
|
|
30
|
-
// ScrollRightToView= require('froth-webdriverio-framework/mobile/commonMethods/scrollRightToView');
|
|
31
|
-
// verifyText= require('froth-webdriverio-framework/mobile/commonMethods/verifyText');
|
|
32
|
-
// }
|
|
33
|
-
// Export the functions
|
|
34
36
|
module.exports = {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
scrollToEnd,
|
|
38
|
+
clickIfVisible,
|
|
39
|
+
verifyTextInFieldAttribute,
|
|
40
|
+
scrollToBeginning,
|
|
41
|
+
scrollToLeft,
|
|
42
|
+
scrollToRight,
|
|
43
|
+
scrollDownToView,
|
|
44
|
+
scrollRightToView,
|
|
43
45
|
verifyText
|
|
44
|
-
};
|
|
46
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
async function
|
|
1
|
+
async function scrollDownToView(text) {
|
|
2
2
|
|
|
3
3
|
try {
|
|
4
4
|
console.log('Scrolling down until text is found');
|
|
@@ -9,4 +9,4 @@ async function ScrollDownToView(text) {
|
|
|
9
9
|
console.error(error.message);
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
module.exports =
|
|
12
|
+
module.exports = scrollDownToView;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
async function
|
|
1
|
+
async function scrollRightToView(text) {
|
|
2
2
|
|
|
3
3
|
try {
|
|
4
4
|
console.log('Scrolling to right until text is found');
|
|
@@ -9,4 +9,4 @@ async function ScrollRightToView(text) {
|
|
|
9
9
|
console.error(error.message);
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
module.exports =
|
|
12
|
+
module.exports = scrollRightToView;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
async function
|
|
1
|
+
async function scrollToBeginning(maxSwipes,steps) {
|
|
2
2
|
|
|
3
3
|
try {
|
|
4
4
|
console.log('Scrolling to beginning');
|
|
@@ -9,4 +9,4 @@ async function ScrollToBeginning(maxSwipes,steps) {
|
|
|
9
9
|
console.error(error.message);
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
module.exports =
|
|
12
|
+
module.exports = scrollToBeginning;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
async function
|
|
1
|
+
async function scrollToEnd(maxSwipes,steps) {
|
|
2
2
|
|
|
3
3
|
try {
|
|
4
4
|
console.log('Scrolling to end');
|
|
@@ -9,4 +9,5 @@ async function ScrollToEnd(maxSwipes,steps) {
|
|
|
9
9
|
console.error(error.message);
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
|
|
13
|
+
module.exports = scrollToEnd;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
async function
|
|
1
|
+
async function scrollToLeft(steps) {
|
|
2
2
|
|
|
3
3
|
try {
|
|
4
4
|
console.log('Scrolling to left');
|
|
@@ -9,4 +9,4 @@ async function ScrollToLeft(steps) {
|
|
|
9
9
|
console.error(error.message);
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
module.exports =
|
|
12
|
+
module.exports = scrollToLeft;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
async function
|
|
1
|
+
async function scrollToRight(steps) {
|
|
2
2
|
|
|
3
3
|
try {
|
|
4
4
|
console.log('Scrolling to right');
|
|
@@ -9,4 +9,4 @@ async function ScrollToRight(steps) {
|
|
|
9
9
|
console.error(error.message);
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
module.exports =
|
|
12
|
+
module.exports = scrollToRight;
|