【RF库XML测试】Element Attribute Should Be

Name:
Element Attribute Should Be
Source:
XML <test library>
Arguments:
[ source | name | expected | xpath=. | message=None ]
Verifies that the specified attribute is `expected`.
The element whose attribute is verified is specified using `source` and `xpath`. They have exactly the same semantics as with `Get Element` keyword.
The keyword passes if the attribute `name` of the element is equal to the `expected` value, and otherwise it fails. The default error message can be overridden with the `message` argument.
To test that the element does not have a certain attribute, Python `None` (i.e. variable `${NONE}`) can be used as the `expected` value. A cleaner alternative is using `Element Should Not Have Attribute`.

原文地址:https://www.cnblogs.com/apple2016/p/7056626.html