记录工作用到的一个简单js脚本

测试极光发送通知接口及客户端处理情况,需在极光后台增加通知数据。由于需要多个输入框输入数据,浏览器关闭后又需重新输入数据,故作此简单js脚本,在浏览器开发者模式下执行,便自动向浏览器输入框输入数据。

document.getElementsByTagName("textarea")[0].value="专家说文章测试切入横幅跳转测试切入横幅跳转"

document.getElementsByClassName("input-global-blue-shadow ng-pristine ng-untouched ng-valid ng-empty")[1].value="origin"
document.getElementsByClassName("input-global-blue-shadow ng-pristine ng-untouched ng-valid ng-empty")[2].value="2"
document.getElementsByClassName("input-global-blue-shadow ng-pristine ng-untouched ng-valid ng-empty")[3].value="expandTime"
document.getElementsByClassName("input-global-blue-shadow ng-pristine ng-untouched ng-valid ng-empty")[4].value="20"
document.getElementsByClassName("input-global-blue-shadow ng-pristine ng-untouched ng-valid ng-empty")[5].value="title"
document.getElementsByClassName("input-global-blue-shadow ng-pristine ng-untouched ng-valid ng-empty")[6].value="专家说测试切入横幅跳转"
document.getElementsByClassName("input-global-blue-shadow ng-pristine ng-untouched ng-valid ng-empty")[7].value="type"
document.getElementsByClassName("input-global-blue-shadow ng-pristine ng-untouched ng-valid ng-empty")[8].value="9"
document.getElementsByClassName("input-global-blue-shadow ng-pristine ng-untouched ng-valid ng-empty")[9].value="cmd"
document.getElementsByClassName("input-global-blue-shadow ng-pristine ng-untouched ng-valid ng-empty")[10].value="60"
document.getElementsByClassName("input-global-blue-shadow ng-pristine ng-untouched ng-valid ng-empty")[11].value="playTime"
document.getElementsByClassName("input-global-blue-shadow ng-pristine ng-untouched ng-valid ng-empty")[12].value="25"
document.getElementsByClassName("input-global-blue-shadow ng-pristine ng-untouched ng-valid ng-empty")[13].value="contId"
document.getElementsByClassName("input-global-blue-shadow ng-pristine ng-untouched ng-valid ng-empty")[14].value="112"
document.getElementsByClassName("input-global-blue-shadow ng-pristine ng-untouched ng-valid ng-empty")[15].value="audioUrl"
document.getElementsByClassName("input-global-blue-shadow ng-pristine ng-untouched ng-valid ng-empty")[16].value="http://.oss-cn-zhangjiakou.aliyuncs.com/test/201804/act/2018042413452771159533.wav"
document.getElementsByClassName("input-global-blue-shadow ng-pristine ng-untouched ng-valid ng-empty")[17].value="imgUrl"
document.getElementsByClassName("input-global-blue-shadow ng-pristine ng-untouched ng-valid ng-empty")[18].value="http://.oss-cn-zhangjiakou.aliyuncs.com/test/201804/act/2018042409343544833575.png"

posted @ 2018-07-15 11:41  拉努斯石  阅读(313)  评论(1编辑  收藏  举报