我想验证价值' Ping信息为'它存在于窗口中。
答案 0 :(得分:0)
您可以创建自己的关键字,以检查给定定位器的文本是否与预期的字符串值相等
To Verify Text
[Arguments] ${locator} ${expectedString}
${Somevariable}= Get Text ${locator}
Should Be Equal ${Somevariable} ${expectedString}
此处Should Be Equal
来自built in
库,Get Text
来自selenium2library。
参考链接:http://robotframework.org/robotframework/latest/libraries/BuiltIn.html#Should%20Be%20Equal http://robotframework.org/Selenium2Library/Selenium2Library.html#Get%20Text