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的更多相关文章

  1. 【RF库XML测试】Element Attribute Should Be

    Name:Element Attribute Should BeSource:XML <test library>Arguments:[ source | name | expected ...

  2. 【RF库XML测试】Get Element

    Name:Get ElementSource:XML <test library>Arguments:[ source | xpath=. ]Returns an element in t ...

  3. 【RF库XML测试】Add Element

    Name:Add ElementSource:XML <test library>Arguments:[ source | element | index=None | xpath=. ] ...

  4. 【RF库XML测试】Get Elements

    Name:Get ElementsSource:XML <test library>Arguments:[ source | xpath ]Returns a list of elemen ...

  5. 【RF库XML测试】parse xml

    Name:Parse XmlSource:XML <test library>Arguments:[ source | keep_clark_notation=False ]Parses ...

  6. 【RF库XML测试】测试的XML文件说明

    文件存放路径:C:\workspace\robotframework\test_rf_api\testdata\XML.xml 文件内容: <example> <first id=& ...

  7. 【RF库XML测试】通过xpath查找元素的说明

    Tag names:当仅使用1个tag的时候,xpath匹配具有该标签名称的所有直接子元素. Paths:通过/符号连接tag名称,例如second/child将匹配父元素second下所有的chil ...

  8. 【RF库Collections测试】List Should Not Contain Duplicates

    Name:List Should Not Contain DuplicatesSource:Collections <test library>Arguments:[ list_ | ms ...

  9. 【RF库Collections测试】lists should be equal

    场景一:msg=None 场景二:自定义msg 场景三:自定义msg和values,且values为布尔类型False或者字符串False和No Values 场景四:自定义msg和values,且v ...

随机推荐

  1. 安卓程序代写 网上程序代写[原]BluetoothClass详解

    一. BluetoothClass简介 1. 继承关系 public final class BluetoothClass extends Object implements Parcelable 该 ...

  2. 从Java开发者的视角解释JavaScript

    我们无法在一篇博文里解释JavaScript的所有细节.如果你正或多或少地涉及了web应用程序开发,那么,我们的Java工具和技术范围报告揭示了,大多数(71%)Java开发者被归到了这一类,只是你对 ...

  3. [kafka] 002_kafka_相关术语详细解析

    参考: http://www.cnblogs.com/likehua/p/3999538.html http://kafka.apache.org/documentation.html#getting ...

  4. ndarray的数据类型

    dtype参数 案例1: dtype(数据类型) 是一个特殊的对象,它含有ndarray , 将一块内存解释为特定数据类型所需的信息. 案例2:  利用astype 方法显式地转换其dtype 注意: ...

  5. C#客户端(WinForm)开机自动启动实现

    /// <summary> /// 修改程序在注册表中的键值 /// </summary> /// <param name="isAuto">t ...

  6. 通过C#脚本实现旋转的立方体

    一.介绍 目的:通过一个简单的例子(鼠标点击,使立方体旋转和变色)熟悉Unity中C#脚本的编写. 软件环境:Unity 2017.3.0f3 . VS2013. 二.C#脚本实现 1,启动Unity ...

  7. [SQL Server] 复制数据库任务

    假设你要生产环境下的数据做相应的测试,比如修改及测试存储过程.更改和优化索引等.但是你用户在连接数据库的情况下,你又不能断开数据库的连接.如何取得数据库的副本呢? 一.  利用数据库任务中的复制数据库 ...

  8. Java实践 — SSH远程执行Shell脚本

    1. SSH简介         SSH是Secure Shell的缩写,一种建立在应用层和传输层基础上的安全协议.SSH在连接和传送过程中会加密所有数据,可以用来在不同系统或者服务器之间进行安全连接 ...

  9. 单用户模式&救援模式&克隆虚拟机&Linux机器相互登录

    1.13 单用户模式 1.14 救援模式 1.15 克隆虚拟机 1.16 Linux机器相互登录 1.单用户模式 关机:init 0 .poweroff 重启:init 6 .reboot 关机:in ...

  10. 局域网 ping

    时间:2013-01-15 11:07来源:网络整理 作者:秩名点击:2271次 |我要投稿 一般情况下,如果我们使用Ping命令来查找网络问题所在或检验网络运行情况,我们需要使用许多Ping命令,如 ...