|
|
@ -3,14 +3,9 @@ import EventEmitter from 'events' |
|
|
|
|
|
|
|
|
|
|
|
class ClickLaunchIcon extends EventEmitter { |
|
|
|
class ClickLaunchIcon extends EventEmitter { |
|
|
|
command (this: NightwatchBrowser, icon: string): NightwatchBrowser { |
|
|
|
command (this: NightwatchBrowser, icon: string): NightwatchBrowser { |
|
|
|
console.log(icon) |
|
|
|
|
|
|
|
this.api |
|
|
|
this.api |
|
|
|
.useXpath() |
|
|
|
.waitForElementVisible('#icon-panel div[plugin="' + icon + '"]') |
|
|
|
.assert.visible(`//*[@id="verticalIconsKind${icon}"]`) |
|
|
|
.click('#icon-panel div[plugin="' + icon + '"]') |
|
|
|
// .waitForElementVisible('#icon-panel div[plugin="' + icon + '"]')
|
|
|
|
|
|
|
|
.click(`//*[@id="verticalIconsKind${icon}"]`) |
|
|
|
|
|
|
|
.useCss() |
|
|
|
|
|
|
|
// .click('#icon-panel div[plugin="' + icon + '"]')
|
|
|
|
|
|
|
|
.perform((done) => { |
|
|
|
.perform((done) => { |
|
|
|
done() |
|
|
|
done() |
|
|
|
this.emit('complete') |
|
|
|
this.emit('complete') |
|
|
|