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. Android studio中出现Couldn't resolve resource @dimen/...

    问题出现: Path.isConvex is not supported. Rendering problems .. Couldn't resolve resource @dimen/...等等 资 ...

  2. R语言判断向量中是否存在一个元素

    判断ori_data[,1]中是否存在元素a: a %in% ori_data[,1] 如果存在返回 true,否则返回 false    

  3. (笔记)Linux下C语言实现静态IP地址,掩码,网关的设置

    #include <sys/ioctl.h> #include <sys/types.h> #include <sys/socket.h> #include < ...

  4. (资源)OpenStack IRC资源

    OpenStack的IRC频道列表 如何在浏览器上进入OpenStack的频道(具体的频道可以参考前面的频道列表) 频道聊天日志和会议日志 这里我使用mIRC而不是浏览器接入IRC,OpenStack ...

  5. [lua, mysql] 将多条记录数据组合成一条sql插入语句(for mysql)

    -- 演示将多条记录数据组合成一条sql插入语句(for mysql) function getTpl0(tname) -- 获取表各个字段 local t = { tpl_pack = {" ...

  6. HTML5 Canvas火焰效果 像火球发射一样

    Canvas是HTML5中非常重要而且有用的东西,我们可以在Canvas上绘制任意的元素,就像你制作Flash一样.今天我们就在Canvas上来制作一款火焰发射的效果.就像古代的火球炮一样,而且可以在 ...

  7. windows上開啟多個apache服務器

    1.安裝apache(這裡我用的是集成環境) 比較php版本 5.6  與 7.2 比較mysql版本 拓展: 注意:對個不同的版本的mysql,命令行進入,需要指明端口號,如:mysql -uroo ...

  8. java提取url里的域名

    使用java标准类库java.net.URL java.net.URL url = new java.net.URL("http://blog.csdn.net/xxx.png") ...

  9. html5 返回当前地理位置的坐标点(经纬度)

    BAIDU <!DOCTYPE html> <html> <body> <p id="demo">点击这个按钮,获得您的坐标:< ...

  10. linux cfs调度器

    在抽象模型中vruntime决定了进程被调度的先后顺序,在真实模型中决定被调度的先后顺序的参数是由函数entity_key决定的.   static inline s64 entity_key(str ...