• 【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

  • 相关阅读:
    MSSQl分布式查询
    欲善其事,必利其器 Librame Utility R1 实用工具包(.NET Framework 3.5)
    可复用的WPF或者Silverlight应用程序和组件设计(3)——控件级别
    Asp.Net 网站优化 数据库优化措施 使用主从库
    .NET独有的精巧泛型设计模式
    Javascript 使用 "大杂烩"
    淘宝下单高并发解决方案
    时间戳(timestamp)
    MSSQL锁机制
    maven开发过程实践
  • 原文地址:https://www.cnblogs.com/apple2016/p/7056884.html
Copyright © 2020-2023  润新知