zoukankan      html  css  js  c++  java
  • 【RF库XML测试】Get Elements

    Name:
    Get Elements
    Source:
    XML <test library>
    Arguments:
    [ source | xpath ]
    Returns a list of elements in the `source` matching the `xpath`.
    The `source` can be a path to an XML file, a string containing XML, or an already parsed XML element. The `xpath` specifies which element to find. See the `introduction` for more details.
    Elements matching the `xpath` are returned as a list. If no elements match, an empty list is returned. Use `Get Element` if you want to get exactly one match.

    Starting test: Test Rf Api.Testxml.Get Elements
    20170627 21:56:38.428 : INFO : ${children} = [<Element 'child' at 0x02FD9B18>, <Element 'child' at 0x02FD9B48>]
    20170627 21:56:38.429 : INFO : Length is 2
    20170627 21:56:38.430 : INFO : more text
    20170627 21:56:38.431 : INFO : None
    20170627 21:56:38.432 : INFO : ${children} = []
    20170627 21:56:38.433 : INFO : Length is 0
    20170627 21:56:38.434 : INFO : ${children} = [<Element 'child' at 0x02FD9CB0>, <Element 'child' at 0x02FD99B0>, <Element 'child' at 0x02FD9C80>]
    20170627 21:56:38.435 : INFO : Length is 3
    20170627 21:56:38.436 : INFO : ${elements} = [<Element 'second' at 0x02FD9BC0>, <Element 'second' at 0x02FD9DE8>]
    20170627 21:56:38.438 : INFO : Length is 2
    20170627 21:56:38.439 : INFO : {'id': '2'}
    20170627 21:56:38.440 : INFO : {'id': 'child'}
    20170627 21:56:38.441 : INFO : ${b} = <Element 'b' at 0x033E5020>
    20170627 21:56:38.442 : INFO :
    Argument types are:
    <type 'str'>
    <type 'unicode'>
    20170627 21:56:38.443 : INFO : ${id} = <Element 'second' at 0x02FD9E60>
    20170627 21:56:38.444 : INFO : Length is 1
    20170627 21:56:38.446 : INFO : ${elem} = <Element 'second' at 0x02FD9D40>
    20170627 21:56:38.446 : INFO :
    Argument types are:
    <type 'str'>
    <type 'unicode'>
    20170627 21:56:38.448 : INFO : ${elem} = <Element 'child' at 0x033E50F8>
    20170627 21:56:38.449 : INFO :
    Argument types are:
    <type 'str'>
    <type 'unicode'>
    20170627 21:56:38.451 : INFO : ${elem} = <Element 'child' at 0x033E5068>
    20170627 21:56:38.452 : INFO :
    Argument types are:
    <type 'NoneType'>
    <type 'NoneType'>
    Ending test: Test Rf Api.Testxml.Get Elements

  • 相关阅读:
    Spring boot 整合 Mybatis + Thymeleaf开发web(一)
    JAVA截取字符串的几种方式
    【转】JAVA异常报错大全
    Linux中允许远程用户登录访问mysql的方法
    Ubuntu系统下将默认的python2.7升级到3.5
    Ubuntu+Django+Nginx+uWSGI+Mysql搭建Python Web服务器
    python将数据写入excel代码,python与office交互
    pyqt4桌面软件各种画布组合结构实例
    python之pyqt4的简单窗口布局以及信号和槽(上代码)
    python 005 正则表达式
  • 原文地址:https://www.cnblogs.com/apple2016/p/7056884.html
Copyright © 2011-2022 走看看