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

  • 相关阅读:
    Microsoft Visual Studio 2010(vs10)安装与使用
    961专业课复习资料
    spring boot: 输出json
    spring boot: 热部署(一) run as – java application (spring-loader-1.2.4.RELEASE.jar)
    FastJson/spring boot: json输出方法二
    FastJson/spring boot: json输出
    FastJson中文乱码
    FastJSON 简单使用
    mytabits表关联一对一(多对一?)
    Model/ModelMap 和 ModelAndView 的区别使用
  • 原文地址:https://www.cnblogs.com/apple2016/p/7087584.html
Copyright © 2011-2022 走看看