代码:
Open browser to homepage
Run Keyword If '${browser}' != 'firefox'
... Set Selenium Implicit wait 30
Run Keyword If '${platform}' == 'mobile'
... Open with emulator
... ELSE IF '${platform}' == 'desktop'
... Run keywords
... Open Browser url=${homepage} browser=${browser} #remote_url=${HUB_URL}
... AND Maximize Browser Window
如何最大化特定测试用例的浏览器窗口?
答案 0 :(得分:1)
为您的关键字添加参数打开浏览器到主页。如果您为其指定默认值,则无需触及现有的关键字调用。
Open browser to homepage
[Arguments] ${maximize}=false
...
Run Keyword If "${maximize}".lower()=="true" Maximize Browser Window