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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "topological-nodered-wdio",
3
3
  "description": "Open source WebdriverIO nodes for Node-RED",
4
- "version": "0.4.2",
4
+ "version": "0.4.3",
5
5
  "author": "topological",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -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
- await common.log(node)
49
- common.handleError(e, node, msg)
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
  }