【发布时间】:2016-12-18 08:30:48
【问题描述】:
如果页面上存在元素,我想运行关键字。
我尝试使用 Selenium 库的 Wait Until Page Contains Element 关键字,但无论该元素是否存在,它都会返回“None”。我尝试设置自定义错误,但这也不起作用:
${condition} = Wait Until Page Contains Element ${locator} timeout=5 error=false
Run Keyword if '${condition}'=='false' click element ${some_refreshButton_locator}
关键字点击元素 ${locator} 只会在我设置条件 '${condition}'=='None' 时运行
我是不是做错了什么?如何让 Selenium 库等到...关键字返回 true 或 false。
谢谢!
【问题讨论】:
标签: selenium wait robotframework