froth-webdriverio-framework 3.0.77 → 3.0.79
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/commonMethods/click.js +23 -0
- package/commonMethods/jwt.js +3 -3
- package/config/wdio.common.conf.js +1 -0
- package/package.json +1 -1
package/commonMethods/click.js
CHANGED
|
@@ -20,6 +20,29 @@ async function clickIfVisible(elementSelector) {
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
async function dobubleClick(elementSelector) {
|
|
24
|
+
try {
|
|
25
|
+
let isDisplayed;
|
|
26
|
+
// Wait for the element to be visible
|
|
27
|
+
await driver.waitUntil(async () => {
|
|
28
|
+
console.log("Waiting for element to be visible");
|
|
29
|
+
const element = await $(elementSelector);
|
|
30
|
+
isDisplayed = await element.isDisplayed();
|
|
31
|
+
console.log("Element is displayed:", isDisplayed);
|
|
32
|
+
if (isDisplayed) {
|
|
33
|
+
// Get the actual text from the element
|
|
34
|
+
const element = await $(elementSelector);
|
|
35
|
+
await element.doubleClick();
|
|
36
|
+
console.log("Element is double clicked successfully.");
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
}, { timeout: 30000 });
|
|
40
|
+
} catch (error) {
|
|
41
|
+
console.error("Element not found or not visible within 30 seconds");
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
|
|
23
46
|
|
|
24
47
|
async function clickByIdWithExecute(elementid) {
|
|
25
48
|
try {
|
package/commonMethods/jwt.js
CHANGED
|
@@ -54,11 +54,11 @@ function main() {
|
|
|
54
54
|
iat: currentTimestamp, // Issued at
|
|
55
55
|
exp: currentTimestamp + 200, // Expiry time: 30 seconds from issuance
|
|
56
56
|
user_agent: {
|
|
57
|
-
id: "janga.reddy@
|
|
57
|
+
id: "janga.reddy@ytl.com"
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
console.log('JWT signed token:', generateJWTToken(payload));
|
|
62
62
|
}
|
|
63
|
-
main()
|
|
64
|
-
|
|
63
|
+
//main()
|
|
64
|
+
module.exports = { generateJWTToken}
|
|
@@ -21,6 +21,7 @@ capabilities.buildName = process.env.BROWSERSTACK_BUILD_NAME;
|
|
|
21
21
|
if (PLATFORM === 'browserstack') {
|
|
22
22
|
process.env.BROWSERSTACK_USERNAME = capabilities.userName;
|
|
23
23
|
process.env.BROWSERSTACK_ACCESS_KEY = capabilities.accessKey;
|
|
24
|
+
console.log('capabilities.platformName:', capabilities.platformName);
|
|
24
25
|
process.env.BS_SESSION_TYPE = capabilities.platformName === 'android' || capabilities.platformName === 'ios' ? 'app-automate' : 'automate';
|
|
25
26
|
|
|
26
27
|
}
|