【RF库XML测试】Get Element Text
Name:
Get Element Text
Source:
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 have exactly the same semantics as with `Get Element` keyword.
This keyword returns all the text of the specified element, including all the text its children and grandchildren contains. If the element has no text, an empty string is returned. As discussed in the `introduction`, the returned text is thus not always the same as the `text` attribute of the element.
Be default all whitespace, including newlines and indentation, inside the element is returned as-is. If `normalize_whitespace` is given any true value (e.g. any non-empty string), then leading and trailing whitespace is stripped, newlines and tabs converted to spaces, and multiple spaces collapsed into one. This is especially useful when dealing with HTML data. 
Starting test: Test Rf Api.Testxml.Get Element Text
20170627 23:05:37.829 : INFO : ${firsttext} = text
20170627 23:05:37.830 : INFO :
Argument types are:
<type 'str'>
<type 'unicode'>
20170627 23:05:37.831 : INFO : ${secondtext} =
20170627 23:05:37.832 : INFO : Length is 0
20170627 23:05:37.834 : INFO :
${thirdtext} =
more text
20170627 23:05:37.835 : INFO : Length is 27
20170627 23:05:37.836 : INFO : ${thirdtextlen} = 27
20170627 23:05:37.837 : INFO : ${paragraph} = <Element 'p' at 0x02F7FA10>
20170627 23:05:37.838 : INFO : ${htmltext} = Text with bold and italics.
20170627 23:05:37.840 : INFO :
Argument types are:
<type 'str'>
<type 'unicode'>
Ending test: Test Rf Api.Testxml.Get Element Text
【RF库XML测试】Get Element Text的更多相关文章
- 【RF库XML测试】Element Attribute Should Be
Name:Element Attribute Should BeSource:XML <test library>Arguments:[ source | name | expected ...
- 【RF库XML测试】Get Element
Name:Get ElementSource:XML <test library>Arguments:[ source | xpath=. ]Returns an element in t ...
- 【RF库XML测试】Add Element
Name:Add ElementSource:XML <test library>Arguments:[ source | element | index=None | xpath=. ] ...
- 【RF库XML测试】Get Elements
Name:Get ElementsSource:XML <test library>Arguments:[ source | xpath ]Returns a list of elemen ...
- 【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库XML测试】通过xpath查找元素的说明
Tag names:当仅使用1个tag的时候,xpath匹配具有该标签名称的所有直接子元素. Paths:通过/符号连接tag名称,例如second/child将匹配父元素second下所有的chil ...
- 【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 ...
随机推荐
- Java设计模式(11)外观模式(Facade模式)
外观模式(Facade)的定义:为子系统中的一组接口提供一个一致的界面. Facade一个典型应用就是数据库JDBC的应用,如下例对数据库的操作: public class DBCompare { C ...
- 用source函数代替繁冗的R语言打包过程
用source函数代替繁冗的R语言打包过程 经过初级的学习和使用R语言之后我们渐渐的开始动手写自己的R语言小程序,这些小程序因为和自己的工作非常契合而变得通用性不是那么强.因此,要让它们成为一个独立的 ...
- 【转】MYSQL数据库四种索引类型的简单使用--MYSQL组合索引“最左前缀”原则
MYSQL数据库索引类型包括普通索引,唯一索引,主键索引与组合索引,这里对这些索引的做一些简单描述: (1)普通索引 这是最基本的MySQL数据库索引,它没有任何限制.它有以下几种创建方式: 创建索引 ...
- Qt的一些鲜为人知但是非常有用的小功能
1. Q_GADGET:不需要从QObject继承就可以使用Qt的Meta Object功能 2. Q_ENUMS:对枚举对象进行反射(reflection) 3. Q_SIGNAL:不需要sig ...
- pymysql.err.InternalError: (1054, "Unknown column 'None' in 'field list'")
错误提示: Traceback (most recent call last): File "D:/projectwc/test/dd.py", line 43, in <m ...
- (笔记)Mysql命令create table:创建数据表
create table命令用来创建数据表. create table命令格式:create table <表名> (<字段名1> <类型1> [,..<字段 ...
- e803. 获得和设置JProgressBar的值
// To create a progress bar, see e801 创建一个JProgressBar组件 // Get the current value int value = progre ...
- 机器学习——使用Apriori算法进行关联分析
从大规模的数据集中寻找隐含关系被称作为关联分析(association analysis)或者关联规则学习(association rule learning). Apriori算法 优点:易编码实现 ...
- Mac homebrew类似apt-get命令安装包
INSTALL brew ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/in ...
- Nagios监控mongodb分片集群服务实战
1,监控插件下载 Mongodb插件下载地址为:git clone git://github.com/mzupan/nagios-plugin-mongodb.git,刚開始本人这里没有安装gitpu ...