parent
4d12181c52
commit
c58503046a
@ -1,15 +0,0 @@ |
||||
const EventEmitter = require('events') |
||||
|
||||
class ElementIsPresent extends EventEmitter { |
||||
command (cssSelector) { |
||||
this.api.execute((cssSelector) => { |
||||
return !!document.querySelector(cssSelector) |
||||
}, [cssSelector], (result) => { |
||||
this.api.assert.equal(false, result.value, `${cssSelector} should not be present`) |
||||
this.emit('complete') |
||||
}) |
||||
return this |
||||
} |
||||
} |
||||
|
||||
module.exports = ElementIsPresent |
@ -1,15 +0,0 @@ |
||||
const EventEmitter = require('events') |
||||
|
||||
class ElementIsPresent extends EventEmitter { |
||||
command (cssSelector) { |
||||
this.api.execute((cssSelector) => { |
||||
return !!document.querySelector(cssSelector) |
||||
}, [cssSelector], (result) => { |
||||
this.api.assert.equal(true, result.value, `${cssSelector} should be present`) |
||||
this.emit('complete') |
||||
}) |
||||
return this |
||||
} |
||||
} |
||||
|
||||
module.exports = ElementIsPresent |
Loading…
Reference in new issue