【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 ...
随机推荐
- 表格细边框的两种CSS实现方法
在网页制作中,细边框这个制作方法是必不可少的.这里介绍2种常见的表格细边框制作方法,均通过XHTML验证. <!DOCTYPE html PUBLIC "-//W3C//DTD XHT ...
- 模拟ajax实现网络爬虫——HtmlUnit
最近在用Jsoup抓取某网站数据,可有些页面是ajax请求动态生成的,去群里问了一下,大神说模拟ajax请求即可.去网上搜索了一下,发现了这篇文章,拿过来先用着试试. 转帖如下: 网上关 ...
- linux下查看目录下某种文件类型累计的代码行数
find 路径 -name '*.py' | xargs wc -l
- 嵌入式开发之zynq——zynq开发环境搭建
http://blog.csdn.net/shushm/article/details/51728690 http://www.cnblogs.com/fpga/p/4593602.html http ...
- CI框架 -- 核心文件 之 Hooks.php
钩子 - 扩展框架核心 CodeIgniter 的钩子特性提供了一种方法来修改框架的内部运作流程,而无需修改 核心文件.CodeIgniter 的运行遵循着一个特定的流程,你可以参考这个页面的 应用程 ...
- ibatis中 $ 于 # 的 区别?
转自: http://www.blogjava.net/lsbwahaha/archive/2009/04/16/266026.html 一个项目中在写ibatis中的sql语句时,where use ...
- MAC算法
MAC算法 (Message Authentication Codes) 带秘密密钥的Hash函数:消息的散列值由只有通信双方知道的秘密密钥K来控制.此时Hash值称作MAC. 原理:在md与sha系 ...
- Godray
软管的这个有点蛋疼..应该是我材质没弄好 最后发现不是材质,是法线不正确,调整后
- crontab(定时任务操作)
定时任务顾名思义就是在某一时间点自动进行任务操作.在做Pgsql的备份利用crontab进行定时操作, 使用起来比较方便.故分享具体的定时编辑命令:crontab -e 首先从crontab的文件分析 ...
- git恢复本地删除的文件夹取消增加的文件
git项目中有时候会在本地增加或者删除了一些文件或者文件夹,但是又不想提交,一般情况下,我们取消本地所有修改: git checkout . 取消指定文件修改: git checkout filena ...