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

  • 相关阅读:
    一个人的旅行 dij(),评测的时候有点惨
    CodeFroce Round 340 div2 E XOR and Favorite Number【莫队算法】
    [HihoCoder-1185] 连通性·三 【tarjan+缩点】
    2017百度之星初赛(A)1001,1005,1006解题报告
    HDU 5961&AOJ 821 传递
    pair
    优先队列 priority_queue
    ccf 201903-5
    memset 和 fill 的区别
    ccf 20190302
  • 原文地址:https://www.cnblogs.com/apple2016/p/7087584.html
Copyright © 2011-2022 走看看