Skip to content

构思中的项目,通过node的配合在网页中执行一些自动化测试。

Notifications You must be signed in to change notification settings

xiongsongsong/control-keyboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

##构想

这是一个构思中的项目,主要想法是在网页中自行一些自动化的操作。

##为了节约时间,基于jQuery

var control = require('control-keyboard')

//press A
control.press('A')

//隔120ms输入A..B..C,然后按Ctrl+A,再按Ctrl+C,然后获取#abc
control.press('ABC',120)
.combo('ctrl+A')
.combo('ctrl+C')
.get('#abc')
.focus()
.combo('ctrl+V')
.then(function(next){
    var i = 0
    var self=this
    var cl= setInterval(function(ev){
        if(i++>5){
            clearInterval(cl)
            self.get('#def').focus()
            next()
        }
    },1000)
})
.press(32)
.get('#send')
.trigger('click')
//press A

About

构思中的项目,通过node的配合在网页中执行一些自动化测试。

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published