【RF库XML测试】Add Element】的更多相关文章

Name:Element Attribute Should BeSource: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 `xpa…
Name:Add ElementSource:XML <test library>Arguments:[ source | element | index=None | xpath=. ]Adds a child element to the specified element. The element to whom to add the new element is specified using `source` and `xpath`. They have exactly the sa…
Name:Get Element TextSource:XML <test library>Arguments:[ source | xpath=. | normalize_whitespace=False ]Returns all text of the element, possibly whitespace normalized. The element whose text to return is specified using `source` and `xpath`. They…
Name:Get ElementSource:XML <test library>Arguments:[ source | xpath=. ]Returns an element in the `source` matching the `xpath`. The `source` can be a path to an XML file, a string containing XML, or an already parsed XML element. The `xpath` specifi…
Name:Get ElementsSource:XML <test library>Arguments:[ source | xpath ]Returns a list of elements in the `source` matching the `xpath`. The `source` can be a path to an XML file, a string containing XML, or an already parsed XML element. The `xpath`…
Name:Parse XmlSource:XML <test library>Arguments:[ source | keep_clark_notation=False ]Parses the given XML file or string into an element structure. The `source` can either be a path to an XML file or a string containing XML. In both cases the XML…
Tag names:当仅使用1个tag的时候,xpath匹配具有该标签名称的所有直接子元素. Paths:通过/符号连接tag名称,例如second/child将匹配父元素second下所有的child子元素. 请注意,如果有多个父元素都有子元素,则xpath将匹配所有这些子元素. Wildcards(通配符):通配符*匹配所有元素 Current element:当前元素用一个点(.)表示,通常,当前元素是隐式的,不需要包含在xpath中. Parent element:其他元素的父元素用两个…
文件存放路径:C:\workspace\robotframework\test_rf_api\testdata\XML.xml 文件内容: <example> <first id="1">text</first> <second id="2"> <child/> </second> <third> <child>more text</child> <se…
Name:List Should Not Contain DuplicatesSource:Collections <test library>Arguments:[ list_ | msg=None ]Fails if any element in the `list` is found from it more than once. The default error message lists all the elements that were found from the `list…
Name:Insert Into ListSource:Collections <test library>Arguments:[ list_ | index | value ]Inserts `value` into `list` to the position specified with `index`. Index '0' adds the value into the first position, '1' to the second, and so on. Inserting fr…