remix-project mirror
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
remix-project/test-browser/commands/createContract.js

22 lines
652 B

const EventEmitter = require('events')
class CreateContract extends EventEmitter {
command (inputParams) {
this.api.perform((done) => {
createContract(this.api, inputParams, () => {
done()
this.emit('complete')
})
})
return this
}
}
function createContract (browser, inputParams, callback) {
browser.clickLaunchIcon('settings').clickLaunchIcon('udapp')
.setValue('div[class^="contractActionsContainerSingle"] input', inputParams, function () {
browser.click('#runTabView button[class^="instanceButton"]').pause(500).perform(function () { callback() })
})
}
module.exports = CreateContract