Dataset Viewer
instruction
stringlengths 2
15
| input
stringlengths 0
93
| output
stringlengths 14
121
|
---|---|---|
等待
|
1000
|
await MR.sleep(1000)
|
打印日志
|
'-----mr-----'
|
await MR.Log.info('-----mr-----')
|
获取操作系统信息
|
const _sys_5jrzrc9 = await MR.System.info()
|
|
获取全部变量信息
|
const _environments = MR.Process.envs()
|
|
获取某个环境变量
|
{_key:''}
|
const _env_wa054x9 = MR.Process.env({_key:''})
|
打开应用/命令
|
{_cmd:''}
|
const _pro_egfeepo = MR.Process.exec({_cmd:''})
|
当前工作目录
|
const _workdir = MR.Process.cwd()
|
|
关闭应用程序
|
{_name:''}
|
const _pro_0zzi9rb = MR.Process.kill({_name:''})
|
截屏/截图
|
{_filename:''}
|
MR.Process.capture({_filename:''})
|
对话框
|
{_type:'info', _msg:'对话框内容', _title:'标题', _timeout:0}
|
const _dlg_4udqo8 = MR.Dialog.do({_type:'info', _msg:'对话框内容', _title:'标题', _timeout:0})
|
品牌信息
|
const _sys_lirkzus = await MR.System.system()
|
|
biso信息
|
const _sys_hosbtqb = await MR.System.bios()
|
|
主板信息
|
const _sys_37ei4nj = await MR.System.baseboard()
|
|
硬件唯一码
|
const _sys_yl7x8h = await MR.System.uuid()
|
|
CPU信息
|
const _sys_ui3qugg = await MR.System.cpu()
|
|
内存信息
|
const _sys_8l6h64b = await MR.System.mem()
|
|
磁盘信息
|
const _sys_nswo3zh = await MR.System.disk()
|
|
USB接口信息
|
const _sys_p37teu7h = await MR.System.usb()
|
|
打印机信息
|
const _sys_9yupaoo = await MR.System.printer()
|
|
蓝牙信息
|
const _sys_9pa540p = await MR.System.bluetooth()
|
|
docker信息
|
const _sys_65ava9 = await MR.System.docker()
|
|
获取鼠标坐标
|
const _mos_1hxeng = await MR.Mouse.getPosition()
|
|
设置鼠标坐标
|
{_x:0,_y:0}
|
await MR.Mouse.setPosition({_x:0,_y:0})
|
鼠标点击
|
{_button:'left',_count:1,_delay:10}
|
await MR.Mouse.click({_button:'left',_count:1,_delay:10})
|
鼠标移动
|
{_x:500, _y:500}
|
await MR.Mouse.move({_x:500, _y:500})
|
鼠标拖动
|
{_x:200, _y:200, _width:100, _height:100}
|
await MR.Mouse.drag({_x:200, _y:200, _width:100, _height:100})
|
鼠标滚轮滑动
|
{_direction: 'Down', _amount: 1}
|
await MR.Mouse.scroll({_direction: 'Down', _amount: 1})
|
获取鼠标对象
|
const mouse= await MR.Mouse.get()
|
|
字符串输入
|
{_msg:'hello'}
|
await MR.Keyboard.str({_msg:'hello'})
|
单一按键
|
{_key:'Tab'}
|
await MR.Keyboard.press({_key:'Tab'})
|
组合按键
|
{_keys:['LeftControl', 'A']}
|
await MR.Keyboard.hotkey({_keys:['LeftControl', 'A']})
|
密码框输入
|
{_msg:'abc'}
|
await MR.Keyboard.password({_msg:'abc'})
|
获取键盘对象
|
const keyboard = await MR.Keyboard.get()
|
|
复制文本至剪贴板
|
{_msg:'hello'}
|
await MR.Clipboard.copy({_msg:'hello'})
|
从剪贴板获取文本内容
|
const _dat_vam6ozt = await MR.Clipboard.getContent()
|
|
复制图片至剪贴板
|
{_imgPath:'d:/demo.png'}
|
await MR.Clipboard.copyImg({_imgPath:'d:/demo.png'})
|
从剪贴板保存图片
|
{_imgPath:'d:/demo.png'}
|
await MR.Clipboard.saveImg({_imgPath:'d:/demo.png'})
|
执行粘贴动作
|
await MR.Clipboard.paste()
|
|
字符串长度
|
{_str:'abc'}
|
const _str_59iwmxi = MR.String.len({_str:'abc'})
|
转换每个首字符大写
|
{_str:'my name'}
|
const _str_ejdrhqq = MR.String.titleCase({_str:'my name'})
|
尝试转为布尔值
|
{_str:'x'}
|
const _str_839gigm = MR.String.toBoolean({_str:'x'})
|
剔除字符串中的空格
|
{_str:' makwing '}
|
const _str_qk8wzub = MR.String.trim({_str:' makwing '})
|
剔除Html/XML标签
|
{_str:'<p>just <b>some</b> text</p>'}
|
const _str_x24zy1e = MR.String.stripTags({_str:'<p>just <b>some</b> text</p>'})
|
剔除全部标点/特殊符
|
{_str:'My, st[ring] *full* of %punct'}
|
const _str_stwj44 = MR.String.stripPunctuation({_str:'My, st[ring] *full* of %punct'})
|
删除全部空格(保留一个空格)
|
{_str:' m ak wi ng'}
|
const _str_y6gxw7n = MR.String.collapseWhitespace({_str:' m ak wi ng'})
|
自定义数据替换
|
{_str:'makwing',_oldChar:'m',_newChar:'n'}
|
const _str_arqiyi = MR.String.replaceAll({_str:'makwing',_oldChar:'m',_newChar:'n'})
|
根据左右字符特征提取中间值
|
{_str:'makwing.com',_left:'mak',_right:'.com'}
|
const _str_d1xl2zm = MR.String.between({_str:'makwing.com',_left:'mak',_right:'.com'})
|
按回车换行分割字符串
|
{_str:'makwing makwing '}
|
const _str_q9kr5k = MR.String.lines({_str:'makwing makwing '})
|
还原Html原始标签
|
{_str:'<div>hi</div>'}
|
const _str_23umksm = MR.String.escapeHTML({_str:'<div>hi</div>'})
|
统计某字符出现数
|
{_str:'makwingmakwing',_char:'ma'}
|
const _str_ibl00u = MR.String.count({_str:'makwingmakwing',_char:'ma'})
|
从右边提取几位字符串
|
{_str:'makwing',_count:3}
|
const _str_n11nkxw = MR.String.right({_str:'makwing',_count:3})
|
从左边提取几位字符串
|
{_str:'makwing',_count:3}
|
const _str_1fopsjb = MR.String.left({_str:'makwing',_count:3})
|
是否为空
|
{_str:' '}
|
const _str_65000mp = MR.String.isEmpty({_str:' '})
|
是否为纯字母
|
{_str:'abc'}
|
const _str_iitbnrm = MR.String.isAlpha({_str:'abc'})
|
是否仅为字母和数字
|
{_str:'abc123'}
|
const _str_oyfd8c = MR.String.isAlphaNumeric({_str:'abc123'})
|
是否都为小写
|
{_str:'a'}
|
const _str_lpc8wuw = MR.String.isLower({_str:'a'})
|
是否都为大写
|
{_str:'A'}
|
const _str_svq82rp = MR.String.isUpper({_str:'A'})
|
是否都以某开头
|
{_str:'hello world',_char:'h'}
|
const _str_7lpom2k = MR.String.startsWith({_str:'hello world',_char:'h'})
|
是否都以某结束
|
{_str:'hello world',_char:'d'}
|
const _str_1ol1ebn = MR.String.endsWith({_str:'hello world',_char:'d'})
|
格式化利于阅读
|
{_str:'ThehumanizeStringMethod'}
|
const _str_drj7w9d = MR.String.humanize({_str:'ThehumanizeStringMethod'})
|
用json数据进行替换
|
{_str:'xyz-{{name}}---abc',_json:{name:'123'}}
|
const _str_ejed4np = MR.String.template({_str:'xyz-{{name}}---abc',_json:{name:'123'}})
|
当前日期详情(年月日时分秒)
|
const _date_dfjcc36 = MR.Date.all()
|
|
当前日期
|
{_format:'YYYY-MM-DD'}
|
let _today = MR.Date.today({_format:'YYYY-MM-DD'})
|
当前时间
|
{_format:'YYYY-MM-DD HH:mm:ss SSS'}
|
let _now = MR.Date.now({_format:'YYYY-MM-DD HH:mm:ss SSS'})
|
当前时间戳
|
{_type:'second'}
|
const _date_ahqaw7 = MR.Date.stamp({_type:'second'})
|
日期比较
|
{_action:'same',_left:'2023-01-01',_right:'2024-01-01'}
|
const _date_693lae = MR.Date.compare({_action:'same',_left:'2023-01-01',_right:'2024-01-01'})
|
日期加值
|
{_time:'2023-01-01',_value:1,_type:'day'}
|
const _date_a267d7u = MR.Date.add({_time:'2023-01-01',_value:1,_type:'day'})
|
日期减值
|
{_time:'2023-01-01',_value:1,_type:'day'}
|
const _date_9dcvq1g = MR.Date.subtract({_time:'2023-01-01',_value:1,_type:'day'})
|
计算时间差
|
{_left:'2023-01-01',_right:'2024-01-01',_type:'day'}
|
const _date_8xmtb4o = MR.Date.diff({_left:'2023-01-01',_right:'2024-01-01',_type:'day'})
|
月份中天数
|
{_time:'2022-01-01'}
|
const _date_985dk1 = MR.Date.daysInMonth({_time:'2022-01-01'})
|
字符串转换为日期
|
{_time:'20220101',_format:'YYYY-MM-DD'}
|
const _date_8azql4 = MR.Date.strToDate({_time:'20220101',_format:'YYYY-MM-DD'})
|
获取日期对象
|
const dayjs = MR.Date.get()
|
|
启动浏览器
|
await MR.Web.launch()
|
|
在浏览器中打开网址
|
'http://www.example.com'
|
await MR.Web.goto('http://www.example.com')
|
关闭浏览器
|
await MR.Web.close()
|
|
获取网页源码
|
const _pg_lchahq = await MR.Web.content()
|
|
网页保存为图片
|
const _pg_iyw1p0r = await MR.Web.screenshot()
|
|
网页保存为PDF
|
const _pg_4eap5ly = await MR.Web.pdf()
|
|
普通方式定位元素
|
'#id'
|
const _ele_sarzl1s = await MR.Web.locator('#id')
|
角色方式定位元素
|
''
|
const _ele_kw7txw = await MR.Web.getByRole('')
|
定位frame
|
const _frm_70qx4sa = await MR.Web.frame()
|
|
定位主frame
|
const _frm_55sip2o = await MR.Web.mainFrame()
|
|
注入js并执行
|
'console.log
|
await MR.Web.executeJs('console.log("hello world")')
|
增加cookies
|
[{name:'1',value:'222'}]
|
await MR.Web.addCookies([{name:'1',value:'222'}])
|
获取Cookies
|
const _pg_ylsh8h = await MR.Web.cookies()
|
|
获取网页标题
|
const _pg_h3hsmo8 = await MR.Web.title()
|
|
获取网页网址
|
const _pg_9w9b5yf = await MR.Web.url()
|
|
获取浏览器视窗长宽
|
const _pg_7ut82ff = await MR.Web.viewportSize()
|
|
网页回退
|
await MR.Web.goBack()
|
|
网页前进
|
await MR.Web.goForward()
|
|
网页刷新
|
await MR.Web.reload()
|
|
元素保存为图片
|
await MR.Web.Element.screenshot()
|
|
清空输入框值
|
await MR.Web.Element.clear()
|
|
元素设置/输入值
|
'Hello'
|
await MR.Web.Element.fill('Hello')
|
元素点击
|
{button:'left',clickCount:1}
|
await MR.Web.Element.click({button:'left',clickCount:1})
|
元素双击
|
{button:'left',clickCount:1}
|
await MR.Web.Element.dblclick({button:'left',clickCount:1})
|
复选/单选设置选中
|
await MR.Web.Element.check()
|
|
复选/单选取消选中
|
await MR.Web.Element.uncheck()
|
|
下拉框设置值
|
await MR.Web.Element.selectOption()
|
|
拖动元素至另一个元素
|
'selector'
|
await MR.Web.Element.dragTo('selector')
|
End of preview. Expand
in Data Studio
README.md exists but content is empty.
- Downloads last month
- 1