froth-webdriverio-framework 1.0.26 → 1.0.27
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/common.mobile.conf.js +5 -7
- package/config/commonconfig.js +9 -0
- package/config/server.js +31 -0
- package/mobile/commonMethods/Utils.js +1 -1
- package/package.json +7 -6
- package/local.log +0 -8
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { all } from 'deepmerge';
|
|
2
|
+
import commonconfig from './commonconfig';
|
|
3
|
+
|
|
3
4
|
console.log("device name in common mobile:", process.env.DEVICENAME);
|
|
4
5
|
|
|
5
|
-
const commonmobconfig =
|
|
6
|
+
const commonmobconfig = all([commonconfig, {
|
|
6
7
|
user: process.env.BROWSERSTACK_USERNAME || 'naveen_OSt3Pw',
|
|
7
8
|
key: process.env.BROWSERSTACK_ACCESS_KEY || 'AuzPy8cHZ7sCBmMXakKe',
|
|
8
9
|
|
|
9
|
-
exclude: [],
|
|
10
10
|
logLevel: 'info',
|
|
11
11
|
coloredLogs: true,
|
|
12
12
|
screenshotPath: './errorShots/',
|
|
@@ -21,8 +21,6 @@ const commonmobconfig = deepmerge.all([commonconfig, {
|
|
|
21
21
|
timeout: 90000
|
|
22
22
|
},
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
24
|
maxInstances: 10,
|
|
27
25
|
|
|
28
26
|
updateJob: false,
|
|
@@ -41,4 +39,4 @@ const commonmobconfig = deepmerge.all([commonconfig, {
|
|
|
41
39
|
|
|
42
40
|
}]);
|
|
43
41
|
|
|
44
|
-
|
|
42
|
+
export default commonmobconfig;
|
package/config/commonconfig.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
const setAllDetails = require("./setallDatailinBuffer")
|
|
2
2
|
const { LocalStorage } = require('node-localstorage');
|
|
3
3
|
global.BUFFER = new LocalStorage('./storage');
|
|
4
|
+
import server from './server';
|
|
4
5
|
|
|
5
6
|
const getBSSessionDetails = require("../api/browsersatckSessionInfo")
|
|
6
7
|
console.log("device name in common :", process.env.DEVICENAME);
|
|
@@ -24,6 +25,11 @@ const commonconfig = {
|
|
|
24
25
|
},
|
|
25
26
|
|
|
26
27
|
before: function (capabilities, specs) {
|
|
28
|
+
|
|
29
|
+
server.listen(8000, () => {
|
|
30
|
+
console.log('Test server started on port 8000');
|
|
31
|
+
});
|
|
32
|
+
|
|
27
33
|
// Code to run before the test suite starts
|
|
28
34
|
console.log('Starting test suite IN EBFORE HOOK ...');
|
|
29
35
|
// Initialize variables, configure environment, etc.
|
|
@@ -115,6 +121,9 @@ const commonconfig = {
|
|
|
115
121
|
// console.log(capabilities);
|
|
116
122
|
// console.log('Specs:');
|
|
117
123
|
// console.log(specs);
|
|
124
|
+
server.close(() => {
|
|
125
|
+
console.log('Test server stopped');
|
|
126
|
+
});
|
|
118
127
|
},
|
|
119
128
|
|
|
120
129
|
};
|
package/config/server.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { createServer } from 'http';
|
|
2
|
+
import { Server } from 'ws';
|
|
3
|
+
|
|
4
|
+
// Create an HTTP server
|
|
5
|
+
const server = createServer((req, res) => {
|
|
6
|
+
res.writeHead(200, { 'Content-Type': 'text/plain' });
|
|
7
|
+
res.end('okay');
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
// Set maxHeaderSize and maxHeadersCount
|
|
11
|
+
server.maxHeaderSize = 8192; // Set maximum header size to 8192 bytes (8 KB)
|
|
12
|
+
server.maxHeadersCount = 0; // No limit on the number of headers
|
|
13
|
+
|
|
14
|
+
// Create a WebSocket server attached to the HTTP server
|
|
15
|
+
const wss = new Server({ server });
|
|
16
|
+
|
|
17
|
+
wss.on('connection', (ws) => {
|
|
18
|
+
ws.on('message', (message) => {
|
|
19
|
+
console.log(`Received message: ${message}`);
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
ws.send('Hello! You are connected.');
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
// Start the server
|
|
26
|
+
const PORT = process.env.PORT || 8000;
|
|
27
|
+
server.listen(PORT, () => {
|
|
28
|
+
console.log(`Server is listening on port ${PORT}`);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export default server;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "froth-webdriverio-framework",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"readme": "
|
|
3
|
+
"version": "1.0.27",
|
|
4
|
+
"readme": "WebdriverIO Integration",
|
|
5
5
|
"description": "WebdriverIO and BrowserStack App Automate",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"scripts": {
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"@wdio/browserstack-service": "^7.16.4",
|
|
30
30
|
"@wdio/cli": "^7.16.4",
|
|
31
31
|
"@wdio/local-runner": "^7.16.4",
|
|
32
|
-
"@wdio/mocha-framework": "^8.
|
|
33
|
-
"@wdio/spec-reporter": "^8.
|
|
32
|
+
"@wdio/mocha-framework": "^8.39.0",
|
|
33
|
+
"@wdio/spec-reporter": "^8.39.0",
|
|
34
34
|
"appium": "^2.3.0",
|
|
35
35
|
"appium-uiautomator2-driver": "^2.38.0",
|
|
36
36
|
"browserstack-local": "^1.5.5",
|
|
@@ -38,7 +38,8 @@
|
|
|
38
38
|
"form-data": "^4.0.0",
|
|
39
39
|
"node-fetch": "^3.3.2",
|
|
40
40
|
"node-localstorage": "^3.0.5",
|
|
41
|
+
"puppeteer-core": "^22.11.2",
|
|
41
42
|
"ts-node": "^10.9.2",
|
|
42
|
-
"typescript": "^5.
|
|
43
|
+
"typescript": "^5.5.2"
|
|
43
44
|
}
|
|
44
|
-
}
|
|
45
|
+
}
|
package/local.log
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Thu Feb 15 2024 20:15:19:833 GMT+0800 (+08) -- Starting configuration console on http://localhost:45454
|
|
4
|
-
Thu Feb 15 2024 20:15:21:656 GMT+0800 (+08) -- [SUCCESS] You can now access your local server(s) in our remote browser
|
|
5
|
-
|
|
6
|
-
Thu Feb 15 2024 20:15:22:756 GMT+0800 (+08) -- Press Ctrl-C to exit
|
|
7
|
-
|
|
8
|
-
|