Skip to content

Commit

Permalink
## ver 2.1.13 (2016-11-23)
Browse files Browse the repository at this point in the history
1. Add: add simulate input event when insert var in recording
  • Loading branch information
itestauipi committed Nov 23, 2016
1 parent b25eafe commit e981369
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
UI Recorder change log
====================

## ver 2.1.13 (2016-11-23)

1. Add: add simulate input event when insert var in recording

## ver 2.1.11 (2016-11-18)

1. Update: update to chromedriver v2.25
Expand Down
13 changes: 7 additions & 6 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
1. PC现场取值存到变量
2. ios输入法无法隐藏问题
3. ios卡壳问题
4. ios无法重复执行问题
5. 支持JAVA等第3方语言模板
6. 支持mac下文件上传
* 公共控件在开始页面提供下拉
* PC现场取值存到变量
* ios输入法无法隐藏问题
* ios卡壳问题
* ios无法重复执行问题
* 支持JAVA等第3方语言模板
* 支持mac下文件上传
21 changes: 21 additions & 0 deletions chrome-extension/js/foreground.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,25 @@
catch(e){}
}

function simulateKeyboardEvent(target, type, keyCode, charCode){
try{
var customEvent = document.createEvent('KeyboardEvent');
customEvent.initKeyEvent(type, false, true, null, false, false, false, false, keyCode, charCode);
target.dispatchEvent(customEvent);
}
catch(e){}
}

function simulateInputEvent(target){
try{
var customEvent = document.createEvent('Event');
customEvent.initEvent('input', true, true);
target.dispatchEvent(customEvent);
}
catch(e){}
}


// 计算字节长度,中文两个字节
function byteLen(text){
var count = 0;
Expand Down Expand Up @@ -641,6 +660,8 @@
varinfo: varinfo,
text: getTargetText(target)
});
simulateKeyboardEvent(target, 'keyup', 20, 20);
simulateInputEvent(target);
}
}
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "uirecorder",
"version": "2.1.12",
"version": "2.1.13",
"description": "A tool for record ui test case",
"main": "./index",
"bin": {
Expand Down
Binary file modified tool/uirecorder.crx
Binary file not shown.

0 comments on commit e981369

Please sign in to comment.