froth-webdriverio-framework 0.1.13 → 0.1.15

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.
@@ -0,0 +1,22 @@
1
+ name: npm_package
2
+
3
+ on:
4
+ workflow_dispatch:
5
+
6
+ jobs:
7
+ release:
8
+ name: release
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - name: Checkout code
12
+ uses: actions/checkout@v2
13
+ - name: Setup Node.js
14
+ uses: actions/setup-node@v2
15
+ with:
16
+ node-version: '12.x'
17
+ registry-url: https://registry.npmjs.org
18
+ - name: Publish to npm
19
+ run: npm publish --access public
20
+ env:
21
+ NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
22
+
@@ -11,7 +11,7 @@ const androidConfig = deepmerge.all([commonmobileconfig,{
11
11
  buildIdentifier: '${BUILD_NUMBER}',
12
12
  browserstackLocal: true,
13
13
  opts: { forcelocal: false, localIdentifier: "webdriverio-appium" },
14
- app : process.env.BROWSERSTACK_APP_PATH || 'bs://995e045683bfc5c2d7ff393f39b35d28be006185'
14
+ app : process.env.BROWSERSTACK_APP_PATH || 'bs://a224145c09eb22e67c21ef65b29d32ae7aa78bb0'
15
15
  }
16
16
  ]
17
17
  ],
@@ -0,0 +1,95 @@
1
+ exports.config = {
2
+ // ====================
3
+ // BrowserStack Configuration
4
+ // ====================
5
+ user: 'prabathkumar_qavxGX',
6
+ key: 'RvqEi62rhwa5QwGJtweZ',
7
+ browserstackLocal: true, // Set to true if using BrowserStack Local Testing
8
+ opts: { forceLocal: true },
9
+ // ====================
10
+ // Specify Test Files
11
+ // ====================
12
+ specs: [
13
+ './web/specs/yes.js', // Path to your test scripts
14
+ ],
15
+ services: [
16
+ ['browserstack', {
17
+ testObservability: true,
18
+ testObservabilityOptions: {
19
+ user: 'prabathkumar_qavxGX' || process.env.BROWSERSTACK_USERNAME,
20
+ key: 'RvqEi62rhwa5QwGJtweZ' || process.env.BROWSERSTACK_ACCESS_KEY,
21
+ projectName: 'YTL_AF',
22
+ buildName: 'YTL_AF_WEBDRIVERIO',
23
+ buildTag: 'YTL_AF_WEBDRIVERIO',
24
+ },
25
+ }]
26
+ ],
27
+ // ====================
28
+ // Capabilities
29
+ // ====================
30
+ capabilities: [
31
+ {
32
+ browserName: 'chrome', // Choose the browser you want to test
33
+ browserVersion: 'latest', // Specify the browser version
34
+ os: 'Windows', // Specify the operating system
35
+ os_version: '10', // Specify the operating system version
36
+ resolution: '1920x1080', // Specify the screen resolution
37
+ 'browserstack.networkLogs': true, // Enable network logs
38
+ 'browserstack.video': true, // Enable video recording
39
+ },
40
+ // Add more capabilities for other browsers or devices as needed
41
+ ],
42
+
43
+ // ====================
44
+ // Test Configurations
45
+ // ====================
46
+ logLevel: 'info', // Set the log level
47
+ bail: 0, // Set to 1 to stop the test suite after the first test failure
48
+ baseUrl: '', // Specify the base URL of your application
49
+ waitforTimeout: 60000, // Set the timeout for all waitFor* commands
50
+ connectionRetryTimeout: 90000, // Set the timeout in milliseconds for test retries
51
+ connectionRetryCount: 3, // Set the number of times to retry the entire spec file
52
+
53
+ // ====================
54
+ // Framework
55
+ // ====================
56
+ framework: 'mocha', // Use the Mocha framework
57
+ reporters: ['spec',
58
+ [
59
+ 'allure',
60
+ {
61
+ outputDir: './web-report/allure-result/',
62
+ disableWebdriverStepsReporting: true,
63
+ disableWebdriverScreenshotsReporting: false,
64
+ },
65
+ ],
66
+ ], // Use the spec reporter
67
+
68
+ // ====================
69
+ // Hooks
70
+ // ====================
71
+ before: function (capabilities, specs) {
72
+ browser.maximizeWindow()
73
+ },
74
+ after: function (capabilities, specs) {
75
+ // Code to run after all tests
76
+ if (error) {
77
+ browser.takeScreenshot();
78
+ }
79
+ },
80
+
81
+ // ====================
82
+ // BrowserStack Options
83
+ // ====================
84
+ browserstackOpts: {
85
+ // BrowserStack-specific options
86
+ },
87
+
88
+ // ====================
89
+ // Mocha Options
90
+ // ====================
91
+ mochaOpts: {
92
+ ui: 'bdd', // Set the test interface to BDD
93
+ timeout: 60000, // Set the timeout for test cases in milliseconds
94
+ },
95
+ };
@@ -0,0 +1,79 @@
1
+
2
+
3
+ exports.config = {
4
+ // ====================
5
+ // BrowserStack Configuration
6
+ // ====================
7
+
8
+ // ====================
9
+ // Specify Test Files
10
+ // ====================
11
+ specs: [
12
+ 'TEST/web/specs/gmail.js', // Path to your test scripts
13
+ ],
14
+
15
+ // ====================
16
+ // Capabilities
17
+ // ====================
18
+ capabilities: [{
19
+ maxInstances: 5,
20
+ browserName: 'chrome',
21
+ acceptInsecureCerts: true,
22
+ }],
23
+
24
+ // ====================
25
+ // Test Configurations
26
+ // ====================
27
+ logLevel: 'info', // Set the log level
28
+ bail: 0, // Set to 1 to stop the test suite after the first test failure
29
+ baseUrl: '', // Specify the base URL of your application
30
+ waitforTimeout: 60000, // Set the timeout for all waitFor* commands
31
+ connectionRetryTimeout: 90000, // Set the timeout in milliseconds for test retries
32
+ connectionRetryCount: 3, // Set the number of times to retry the entire spec file
33
+
34
+ // ====================
35
+ // Framework
36
+ // ====================
37
+ framework: 'mocha', // Use the Mocha framework
38
+ reporters: ['spec', 'allure'], // Use the spec reporter
39
+ reporterOptions: {
40
+ allure: {
41
+ outputDir: 'allure-results',
42
+ disableWebdriverStepsReporting: true,
43
+ disableWebdriverScreenshotsReporting: false,
44
+ }
45
+ },
46
+ // ====================
47
+ // Hooks
48
+ // ====================
49
+ before: function (capabilities, specs) {
50
+ // Code to run before the first test
51
+ const currentDate = new Date();
52
+ const timestamp = currentDate.toISOString().replace(/[:.]/g, '');
53
+ browser.saveScreenshot('./screenshot_' + timestamp + '.png');
54
+
55
+ },
56
+ after: function (capabilities, specs) {
57
+ // Code to run to take screenshots
58
+ const currentDate = new Date();
59
+ const timestamp = currentDate.toISOString().replace(/[:.]/g, '');
60
+ browser.saveScreenshot('./screenshot_' + timestamp + '.png');
61
+
62
+
63
+ },
64
+
65
+ // ====================
66
+ // BrowserStack Options
67
+ // ====================
68
+ browserstackOpts: {
69
+ // BrowserStack-specific options
70
+ },
71
+
72
+ // ====================
73
+ // Mocha Options
74
+ // ====================
75
+ mochaOpts: {
76
+ ui: 'bdd', // Set the test interface to BDD
77
+ timeout: 60000, // Set the timeout for test cases in milliseconds
78
+ },
79
+ };
@@ -1,3 +1,6 @@
1
+ global.rootFolderPath = process.cwd();
2
+ console.log("Root folder path 4:", rootFolderPath);
3
+ if(process.env.LOCATION == 'local'){
1
4
  const ScrollToEnd = require('./ScrollToEnd');
2
5
  const ClickIfVisible= require('./clickIfVisible');
3
6
  const VerifyTextInFieldAttribute= require('./verifyTextInFieldAttribute');
@@ -7,6 +10,17 @@ const ScrollToRight = require('./scrollToRight');
7
10
  const ScrollDownToView= require('./ScrollDownToView');
8
11
  const ScrollRightToView= require('./ScrollRightToView');
9
12
  const verifyText= require('./verifyText');
13
+ }else{
14
+ const ScrollToEnd = require('/froth-webdriverio-framework/mobile/commonMethods/ScrollToEnd');
15
+ const ClickIfVisible= require('/froth-webdriverio-framework/mobile/commonMethods/clickIfVisible');
16
+ const VerifyTextInFieldAttribute= require('/froth-webdriverio-framework/mobile/commonMethods/verifyTextInFieldAttribute');
17
+ const ScrollToBeginning = require('/froth-webdriverio-framework/mobile/commonMethods/scrollToBeginning');
18
+ const ScrollToLeft = require('/froth-webdriverio-framework/mobile/commonMethods/scrollToLeft');
19
+ const ScrollToRight = require('/froth-webdriverio-framework/mobile/commonMethods/scrollToRight');
20
+ const ScrollDownToView= require('/froth-webdriverio-framework/mobile/commonMethods/ScrollDownToView');
21
+ const ScrollRightToView= require('/froth-webdriverio-framework/mobile/commonMethods/ScrollRightToView');
22
+ const verifyText= require('/froth-webdriverio-framework/mobile/commonMethods/verifyText');
23
+ }
10
24
  // Export the functions
11
25
  module.exports = {
12
26
  ScrollToEnd,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "froth-webdriverio-framework",
3
- "version": "0.1.13",
3
+ "version": "0.1.15",
4
4
  "readme": "WendriverIO Integration with [BrowserStack]",
5
5
  "description": "WebdriverIO and BrowserStack App Automate",
6
6
  "license": "MIT",