#打开浏览器
Open Browser http://www.baidu.com Firefox
Comment Sleep 3s
#窗口最大化
Maximize Browser Window
Comment #用ID定位
Comment Sleep 3s
Comment Input Text id=kw 张三
Comment Sleep 3s
Comment Click Element id=su
Comment #等待时间(可秒、分、时、天)
#鼠标移动到指定位置,悬浮
Mouse Down xpath=//*[@id="s-usersetting-top"]
Click Element xpath=//*[@id="s-user-setting-menu"]/div/a[2]
Sleep 3s
Select From List By Value class=c-select adv-gpc-select 最近一天
Sleep 3s
#关闭浏览器
Close All Browsers
#打开浏览器
Comment Open Browser https://image.baidu.com/ Firefox
Open Browser https://image.baidu.com/ Edge
#窗口最大化
Maximize Browser Window
Sleep 2s
Click Element id=sttb
Sleep 2s
#上传文件
Choose File xpath=//*[@id="stfile"] C:\\Users\\hlj\\Pictures\\Saved Pictures\\123.jpg
log OK #用于输出
#打开浏览器
Comment Open Browser https://image.baidu.com/
Open Browser http://www.baidu.com Edge
#窗口最大化
Maximize Browser Window
Comment Wait Until Page Contains Element id=kw timeout=2s error=failed #等待2S,如果2S内还未显示id=kw,则日志报错failed
Wait Until Page Contains Element id=xxx timeout=2s error=failed #等待2S,如果2S内还未显示id=xxx,则日志报错failed
#常规变量 ${name}
${name} Set Variable 123456
#字典 &{dict}
&{dict} Create Dictionary aaa=111 bbb=222 c=333
#集合 @{li}
@{li} Create List a b c d
log ${name}