【问题标题】:Sahi - get element using custom attributes or multiple attributesSahi - 使用自定义属性或多个属性获取元素
【发布时间】:2023-03-08 04:33:02
【问题描述】:

我想使用我选择的多个自定义属性在 Sahi 脚本中获取一个元素。 它是一个<td >,具有动态生成的不同属性。标题属性为空,即""。元素定义示例如下:

<td title="" rownumber="1" rmbnum="0,1" rowId="8090.9008.6352.8721" class="my-class my-class2" position="4">

这里的行 id 是动态生成的。 单击此元素后,我需要单击此元素,然后生成一个文本框,我们需要在其中填充值-值是文本格式。 我想使用 rmbnum 和 position 属性来获取这个元素。

我已经搜索了 sahi 论坛但无法找到它。

问候, 拉胡尔

【问题讨论】:

    标签: attributes custom-attributes sahi


    【解决方案1】:

    你可以使用

    _cell({rmbnum:"0,1",position:"4"})
    

    文档现已更新。 http://sahi.co.in/w/browser-accessor-apis

    【讨论】:

      【解决方案2】:

      你也可以试试

      _cell(_table(“items”), rowIndex, columnIndex)
      _cell(_table(“items”), rowName, columnName)
      

      有关示例,请参阅 http://sahi.co.in/w/_cell

      【讨论】:

        猜你喜欢
        • 2020-12-13
        • 1970-01-01
        • 2022-01-22
        • 1970-01-01
        • 2021-07-31
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多