【RF库XML测试】Get Elements
Name:
Get Elements
Source:
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` specifies which element to find. See the `introduction` for more details.
Elements matching the `xpath` are returned as a list. If no elements match, an empty list is returned. Use `Get Element` if you want to get exactly one match.
Starting test: Test Rf Api.Testxml.Get Elements
20170627 21:56:38.428 : INFO : ${children} = [<Element 'child' at 0x02FD9B18>, <Element 'child' at 0x02FD9B48>]
20170627 21:56:38.429 : INFO : Length is 2
20170627 21:56:38.430 : INFO : more text
20170627 21:56:38.431 : INFO : None
20170627 21:56:38.432 : INFO : ${children} = []
20170627 21:56:38.433 : INFO : Length is 0
20170627 21:56:38.434 : INFO : ${children} = [<Element 'child' at 0x02FD9CB0>, <Element 'child' at 0x02FD99B0>, <Element 'child' at 0x02FD9C80>]
20170627 21:56:38.435 : INFO : Length is 3
20170627 21:56:38.436 : INFO : ${elements} = [<Element 'second' at 0x02FD9BC0>, <Element 'second' at 0x02FD9DE8>]
20170627 21:56:38.438 : INFO : Length is 2
20170627 21:56:38.439 : INFO : {'id': '2'}
20170627 21:56:38.440 : INFO : {'id': 'child'}
20170627 21:56:38.441 : INFO : ${b} = <Element 'b' at 0x033E5020>
20170627 21:56:38.442 : INFO :
Argument types are:
<type 'str'>
<type 'unicode'>
20170627 21:56:38.443 : INFO : ${id} = <Element 'second' at 0x02FD9E60>
20170627 21:56:38.444 : INFO : Length is 1
20170627 21:56:38.446 : INFO : ${elem} = <Element 'second' at 0x02FD9D40>
20170627 21:56:38.446 : INFO :
Argument types are:
<type 'str'>
<type 'unicode'>
20170627 21:56:38.448 : INFO : ${elem} = <Element 'child' at 0x033E50F8>
20170627 21:56:38.449 : INFO :
Argument types are:
<type 'str'>
<type 'unicode'>
20170627 21:56:38.451 : INFO : ${elem} = <Element 'child' at 0x033E5068>
20170627 21:56:38.452 : INFO :
Argument types are:
<type 'NoneType'>
<type 'NoneType'>
Ending test: Test Rf Api.Testxml.Get Elements
【RF库XML测试】Get Elements的更多相关文章
- 【RF库XML测试】Get Element
Name:Get ElementSource:XML <test library>Arguments:[ source | xpath=. ]Returns an element in t ...
- 【RF库XML测试】Get Element Text
Name:Get Element TextSource:XML <test library>Arguments:[ source | xpath=. | normalize_whitesp ...
- 【RF库XML测试】Add Element
Name:Add ElementSource:XML <test library>Arguments:[ source | element | index=None | xpath=. ] ...
- 【RF库XML测试】通过xpath查找元素的说明
Tag names:当仅使用1个tag的时候,xpath匹配具有该标签名称的所有直接子元素. Paths:通过/符号连接tag名称,例如second/child将匹配父元素second下所有的chil ...
- 【RF库XML测试】Element Attribute Should Be
Name:Element Attribute Should BeSource:XML <test library>Arguments:[ source | name | expected ...
- 【RF库XML测试】parse xml
Name:Parse XmlSource:XML <test library>Arguments:[ source | keep_clark_notation=False ]Parses ...
- 【RF库XML测试】测试的XML文件说明
文件存放路径:C:\workspace\robotframework\test_rf_api\testdata\XML.xml 文件内容: <example> <first id=& ...
- 【RF库Collections测试】List Should Not Contain Duplicates
Name:List Should Not Contain DuplicatesSource:Collections <test library>Arguments:[ list_ | ms ...
- 【RF库Collections测试】lists should be equal
场景一:msg=None 场景二:自定义msg 场景三:自定义msg和values,且values为布尔类型False或者字符串False和No Values 场景四:自定义msg和values,且v ...
随机推荐
- How Vmware snapshots works
VMware中的快照是对VMDK在某个时间点的“拷贝”,这个“拷贝”并不是对VMDK文件的复制,而是保持磁盘文件和系统内存在该时间点的状态,以便在出现故障后虚拟机能够恢复到该时间点.如果对某个虚拟机创 ...
- C++视频课程
一.视频课程 课程名称:C++学习教程 程序设计 C++基础教程 授课人:郭宏志 课程链接:http://study.163.com/course/courseMain.htm?courseId=63 ...
- java 5.0引入的新特性-枚举
概念 首先,枚举并不是一种新技术,而是一种基础数据类型.它隶属于两种基础类型中的值类型,如下: 2. 为什么要有枚举 枚举在真正的开发中是非常常用的,它的作用很简单也很纯粹:它定义了一种规范,就是要 ...
- MongoDB MapReduce 小例子
var map = function(){ if (this.gscode == "ZTJB"){ ymd = this.ymd; emit("maxymd", ...
- Lucene系列五:Lucene索引详解(IndexWriter详解、Document详解、索引更新)
一.IndexWriter详解 问题1:索引创建过程完成什么事? 分词.存储到反向索引中 1. 回顾Lucene架构图: 介绍我们编写的应用程序要完成数据的收集,再将数据以document的形式用lu ...
- 使用jenkins配置.net mvc网站进行持续集成
最近好久没有更新文章了,因为好久没有写代码了,以至于我不知道同大家分享些什么,刚好,今天突然叫我学习下jenkins每日构建,我就把今天的学习笔记记录下来,这其中很多东西都是公司同事之前调研总结的,我 ...
- RHEL 7 中 systemctl 的用法(替代service 和 chkconfig)
1.systemctl是RHEL 7 的服务管理工具中主要的工具,它融合之前service和chkconfig的功能于一体.可以使用它永久性或只在当前会话中启用/禁用服务. systemctl可以列出 ...
- C# 一个多层循环中,break一次能跳出几个循环?
public class BreakTest { public static void main(String[] args) { ; x<; x++) { ; y<; y++) { ; ...
- 格林威治时间(GTM)转北京时间
需要模块:pytz(三方)和datetime import pytz import datetime time = "Tue, 12 Jun 2012 14:03:10 GMT" ...
- mysql用户管理 常用sql语句 mysql数据库备份恢复