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

  • 相关阅读:
    1.1获取go运行版本信息
    11.exporting 导出
    MyBatis的dao的mapper写法
    用Intellij IDEA建mybatis案例
    面向对象之多态
    this和构造器的内存分析(***)
    服务器解析请求的基本原理
    接口和抽象类的使用上的区别和选择
    intelliJ IDEA之使用svn或git管理代码
    IntelliJ IDEA的使用之调试方法
  • 原文地址:https://www.cnblogs.com/apple2016/p/7087584.html
Copyright © 2011-2022 走看看