【问题标题】:Check checkbox if following label value is correct如果以下标签值正确,请选中复选框
【发布时间】:2021-02-08 12:44:33
【问题描述】:

我有一个用户管理,想选中带有“测试”的标签前的复选框。复选框和标签彼此分开。我不能使用 //input[@type='checkbox'])[3] 因为复选框和标签可以出现在不同的行上。

checkbox         user
checkbox         bla
checkbox         trying
checkbox         test

复选框的html:<input type="checkbox" class="ant-checkbox-input ng-valid ng-dirty ng-touched">

html 用户:<app-userprofile-title _ngcontent-ads-c205="" _nghost-ads-c77="" class="ng-star-inserted">test</app-userprofile-title>

【问题讨论】:

    标签: katalon-studio katalon-recorder katalon


    【解决方案1】:

    尝试使用这个 Xpath

    //input[@type='checkbox']//*[contains(., 'test')]
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-09-26
      • 2021-12-21
      • 2013-12-06
      • 2011-07-13
      • 2018-07-04
      • 2016-06-29
      • 2015-01-02
      相关资源
      最近更新 更多