zoukankan      html  css  js  c++  java
  • 【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

  • 相关阅读:
    【代码笔记】iOS-JQIndicatorViewDemo
    【代码笔记】iOS-plist获得城市列表
    【代码笔记】iOS-HTTPQueue下载图片
    【代码笔记】iOS-请求去掉url中的空格
    【代码笔记】iOS-collectionView实现照片删除
    【代码笔记】iOS-自定义loading(IanAlert)
    Foundation框架-NSCalendar
    iOS Xcode全面剖析
    Mac下Git的基础操作
    iOS开发UI篇—常见的项目文件介绍
  • 原文地址:https://www.cnblogs.com/apple2016/p/7087584.html
Copyright © 2011-2022 走看看