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. json如何把键名作为变量?

    有时候在项目开发过程中,我们需要把json对象的键名作为一个变量.此时我们该怎么做呢? 传统的json数据格式如下: <script type="text/javascript&quo ...

  2. 安卓程序代写 网上程序代写[原]ViewGroup(容器组件)详解(API解析)

    一. ViewGroup简介 1.View和ViewGroup关系 UI组件在Android中的位置 : Android中的UI组件大部分都放在android.widget 或者 android.vi ...

  3. Linux 条件变量函数signal和wait补充

    pthread_cond_wait必须放在pthread_mutex_lock和pthread_mutex_unlock之间,因为他要根据共享变量的状态来觉得是否要等待,而为了不永远等待下去所以必须要 ...

  4. 【Html】div 加载 html页面的方法

    做网页的单页面应用时,需要在一个HTML的Div元素中加载另一个HTML页面,以前有一种方法就是用iframe,举例如下:(亲测可行) <div class="main-contain ...

  5. 【Python】【Flask】前端调用后端方法返回页面

    后端代码: @app.route("/test",methods=['POST','GET']) def test(): return "我是测试的" 前端代码 ...

  6. 第三百八十九节,Django+Xadmin打造上线标准的在线教育平台—列表筛选结合分页

    第三百八十九节,Django+Xadmin打造上线标准的在线教育平台—列表筛选结合分页 根据用户的筛选条件来结合分页 实现原理就是,当用户点击一个筛选条件时,通过get请求方式传参将筛选的id或者值, ...

  7. Linux-HA实战(2)— TFS Nameserver HA之虚拟IP

    对TFS的Nameserver做机器级别的HA通过虚拟IP机制就可以了,只需要一个Heartbeat就可以搞定,下面简单说下步骤. 操作系统:CentOS 6.4 x86_64 Heartbeat: ...

  8. e825. 当JSplitPane改变大小时分配空间

    The weight of a split pane controls the behavior of the divider when the split pane is resized. If t ...

  9. poj1276

    题目链接:http://poj.org/problem? id=1276 Cash Machine Time Limit: 1000MS   Memory Limit: 10000K Total Su ...

  10. Windows下安装Oracle12C(二)

    一.安装Oracle 参考 Windows下安装Oracle12C(一) 二.新建用户 1. 安装完成后,启动SQLPlus,然后输入内置的用户名和密码 用户名:sys   密码:as sysdba ...