froth-webdriverio-framework 2.0.7 → 2.0.9
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.
|
@@ -70,7 +70,7 @@ async function getExecuitonScriptDetails(frothUrl, token, execution_id, script_i
|
|
|
70
70
|
});
|
|
71
71
|
if (response.ok) {
|
|
72
72
|
const data = await response.json();
|
|
73
|
-
|
|
73
|
+
// console.log(data)
|
|
74
74
|
id = data[0].id;
|
|
75
75
|
console.log("ID is :" + id)
|
|
76
76
|
// console.log("json data :" + JSON.stringify(jsondata));
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
async function assertText(driver, elementSelector, expectedText) {
|
|
4
4
|
|
|
5
5
|
try {
|
|
6
|
+
console.log("inside the assert text function")
|
|
6
7
|
// Wait for the element to be visible
|
|
7
8
|
await driver.waitUntil(async () => {
|
|
8
9
|
const element = await driver.$(elementSelector);
|
|
@@ -14,13 +15,13 @@ async function assertText(driver, elementSelector, expectedText) {
|
|
|
14
15
|
const actualText = await element.getText();
|
|
15
16
|
|
|
16
17
|
// Compare the actual text with the expected text
|
|
17
|
-
if (actualText
|
|
18
|
-
console.log('
|
|
19
|
-
driver.execute('browserstack_executor: {"action": "annotate", "arguments": {"data":"
|
|
18
|
+
if (actualText == expectedText) {
|
|
19
|
+
console.log('Assertion passed. Actual text:', actualText, 'Expected text:', expectedText);
|
|
20
|
+
driver.execute('browserstack_executor: {"action": "annotate", "arguments": {"data":"Assertion passed. Actual text:'+actualText+'",Expected text:"'+expectedText+'","level": "info"}}');
|
|
20
21
|
return true;
|
|
21
22
|
} else {
|
|
22
|
-
driver.execute('browserstack_executor: {"action": "annotate", "arguments": {"data":"
|
|
23
|
-
console.error('
|
|
23
|
+
driver.execute('browserstack_executor: {"action": "annotate", "arguments": {"data":"Assertion failed. Actual text:'+actualText+'",Expected text:"'+expectedText+'","level": "error"}}');
|
|
24
|
+
console.error('Assertion failed. Actual text:', actualText, 'Expected text:', expectedText);
|
|
24
25
|
throw error;
|
|
25
26
|
}
|
|
26
27
|
} catch (error) {
|