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/apps/remix-ide/test-browser/commands/selectContract.js

23 lines
547 B

const EventEmitter = require('events')
class SelectContract extends EventEmitter {
command (contractName) {
this.api.perform((done) => {
selectContract(this.api, contractName, () => {
done()
this.emit('complete')
})
})
return this
}
}
function selectContract (browser, contractName, callback) {
browser.clickLaunchIcon('settings').clickLaunchIcon('udapp')
.setValue('#runTabView select[class^="contractNames"]', contractName).perform(() => {
callback()
})
}
module.exports = SelectContract