Skip to content

Instantly share code, notes, and snippets.

@mogocat
Last active March 13, 2017 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mogocat/ce2d5a78a9e3d9b73f7ed170c4c164ef to your computer and use it in GitHub Desktop.
Save mogocat/ce2d5a78a9e3d9b73f7ed170c4c164ef to your computer and use it in GitHub Desktop.
[Selenium]#tag:selenium, test
module.exports = {
seconds: 500,
minutes: 3000,
// '@disabled': true,
'配件 增删改查': function(client) {
client.resizeWindow(1280, 800)
client.url('http://127.0.0.1:8080')
// 添加配件
var fixingsAdd = '.el-menu-item:nth-child(2) , .el-button--primary'
client.click(fixingsAdd)
client.pause(this.seconds)
var addNameInput = '.el-col-4:nth-child(1) .el-input__inner'
var addCateInput = '.el-cascader .el-input__inner'
var addCodeInput = '.el-input-group--prepend .el-input__inner'
var addNoteInput = '.el-col-4+ .el-col-4 .el-input__inner:nth-child(1)'
client.setValue(addNameInput, "测试小配件")
// client.setValue(addCateInput, "1")
client.setValue(addCodeInput, "009")
client.setValue(addNoteInput, "测试小备注")
var addSubmitButton = '.el-button--primary span'
client.click(addSubmitButton)
client.pause(this.minutes)
client.pause(this.minutes)
client.end()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment