Skip to content

Instantly share code, notes, and snippets.

@seozed
Created May 20, 2020 09:16
Show Gist options
  • Save seozed/3c083979aa3092a7b92203ab0e8e3479 to your computer and use it in GitHub Desktop.
Save seozed/3c083979aa3092a7b92203ab0e8e3479 to your computer and use it in GitHub Desktop.
[click_by_bounds] #autojs
/** 通过元素的坐标进行点击事件
*
* @param {*} selector 元素选择器
*/
function click_by_bounds(selector){
var b = selector.findOne().bounds();
return click(b.centerX(), b.centerY());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment