【发布时间】:2016-01-08 23:35:58
【问题描述】:
当我运行此代码时,它显示 ${month} not found 并且 ${month status} 正在返回 True:
${month status}= Run Keyword and Return Status Element Should Be Visible xpath=//div[@data-title='Cost for Month']
Run Keyword If '${month status}' == 'True'
... ${month}= Get Text xpath=//div[@data-title='Cost for Month']
... Log Dashboard is displaying ${month} Cost Usage for month Text
... ELSE
... Fail Cost Dashboard is not displaying Cost Usage for month Text
【问题讨论】:
-
请格式化您的代码块并为您的问题添加更多上下文
-
为什么 Get Text 应该在这种情况下工作,您确定这是适合您场景的关键字吗?更多信息将帮助我们确定这一点,向我们展示 html 的 sn-p。