读取后台数据文件:Import Variables | ${CURDIR}/\ABC.py
定位页面:Wait Until Keyword Succeeds | 5s | 500ms | select window | url = %Index.aspx%/title =
xpath定位:xpath=//button[text()="查找"]
xpath=//input[@name='Jbr']/parent::*/parent::*/td[2]/img
FOR循环:
${local_J} Evaluate len(${ABC}) #获得数组参数的个数
: FOR ${local_I} IN RANGE ${local_J} #for循环,遍历所有参数
修改合约规划信息 title=选择合约规划 ${ABC[${local_I}][0]} ${ABC[${local_I}][1]}
验证不通过继续执行:Run Keyword And Continue On Failure
页面值校验:Textfield Value Should Be | ABC | ${ABC_Check} | message=结果值对比错误!
编辑框基本输入:Input Text
Alert点击(常规方式):Confirm Action
Alert点击(非常规方式):
Win Activate | 页面Title | 页面文字内容
Control Click | 页面Title | 按钮中文名称 | 按钮英文名称
Control Click | 页面Title | 按钮中文名称 | 按钮英文名称
上传图片:
click element //input[@class="id_observe"] #点击身份证正面上传
sleep 1s
Win Wait 打开
sleep 1s
Win Activate 打开
Control Set Text \ \ Edit1 ${filename_observe}
Control Click \ \ Button1
sleep 1s
Win Wait 打开
sleep 1s
Win Activate 打开
Control Set Text \ \ Edit1 ${filename_observe}
Control Click \ \ Button1