在使用robot framework時需要獲取文本,然後對比文本內容來判斷操作是否成功,在這裏獲取文本使用:
Get text或者get value
Get text時後面的地址定位信息(location)如果是span元素,要加[text()]。
對比時有:
Should Be Equal As Integers/ Numbers/Strings,分別是對比整數、數字、字符串的。除了要相同還有不相同,如:Should Not Be Equal As Integers/ Numbers/Strings。
還有以什麼字符開頭,結尾should start with、should end with。
模糊匹配的:Should Match Regexp,Should Match。
具體使用可以按Ctrl+Alt+空格查看使用解釋