topological-nodered-wdio 0.4.2 → 0.4.3
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/package.json +1 -1
- package/src/element-check.js +12 -2
package/package.json
CHANGED
package/src/element-check.js
CHANGED
|
@@ -18,6 +18,7 @@ module.exports = function (RED) {
|
|
|
18
18
|
locateUsing,
|
|
19
19
|
locateValue
|
|
20
20
|
)
|
|
21
|
+
await element.waitForDisplayed({timeout: 10000, reverse: false, timeoutMsg: 'unable to find', interval : 2000})
|
|
21
22
|
|
|
22
23
|
if (config.check === 'clickable') {
|
|
23
24
|
node.log = `Check the webelement is clickable, identified using ${locateUsing}: "${locateValue}".`
|
|
@@ -45,8 +46,17 @@ module.exports = function (RED) {
|
|
|
45
46
|
common.successStatus(node)
|
|
46
47
|
node.send(msg)
|
|
47
48
|
} catch (e) {
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
if(e.message == 'unable to find'){
|
|
50
|
+
msg.payload = false
|
|
51
|
+
node.log = `Webelement is NOT displayed, identified using ${locateUsing}: "${locateValue}".`
|
|
52
|
+
await common.log(node)
|
|
53
|
+
common.successStatus(node)
|
|
54
|
+
node.send(msg)
|
|
55
|
+
}
|
|
56
|
+
else{
|
|
57
|
+
await common.log(node)
|
|
58
|
+
common.handleError(e, node, msg)
|
|
59
|
+
}
|
|
50
60
|
}
|
|
51
61
|
})
|
|
52
62
|
}
|