parent
bb81c55337
commit
7aa2694733
@ -0,0 +1,21 @@ |
||||
import { NightwatchBrowser } from 'nightwatch' |
||||
import EventEmitter from 'events' |
||||
|
||||
class EnableClipBoard extends EventEmitter { |
||||
command (this: NightwatchBrowser, remember:boolean, accept: boolean): NightwatchBrowser { |
||||
const browser = this.api |
||||
if(browser.isChrome()){ |
||||
const chromeBrowser = (browser as any).chrome |
||||
chromeBrowser.setPermission('clipboard-read', 'granted') |
||||
chromeBrowser.setPermission('clipboard-write', 'granted') |
||||
} |
||||
if(browser.isFirefox()){ |
||||
const firefoxBrowser = (browser as any).firefox |
||||
console.log('ff', firefoxBrowser) |
||||
//firefoxBrowser.setPreference('devtools.inspector.clipboardSource.allowedOrigins', 'http://localhost:8080')
|
||||
} |
||||
return this |
||||
} |
||||
} |
||||
|
||||
module.exports = EnableClipBoard |
@ -0,0 +1,13 @@ |
||||
'use strict' |
||||
import { NightwatchBrowser } from 'nightwatch' |
||||
import init from '../helpers/init' |
||||
|
||||
module.exports = { |
||||
'@disabled': true, |
||||
before: function (browser: NightwatchBrowser, done: VoidFunction) { |
||||
init(browser, done) |
||||
}, |
||||
'Should copy paste a file #flaky #group1': function (browser: NightwatchBrowser) { |
||||
|
||||
}, |
||||
} |
Loading…
Reference in new issue