首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏TestOps云层

    Xpath关键字ends-with无法使用的问题

    So you'll have to implement it yourself with a combination of string-length, substringand equals substring (@id, string-length(@id) - string-length('register') +1) = 'register' https://stackoverflow.com/questions input[starts-with(@id,'calc')] //input[not(@type="input")] ends-with不匹配可以使用 //input[substring(@type, string-length (@type) - string-length('t') +1) = 't'] 除此之外还有,选取若干路径 通过在路径表达式中使用"|"运算符,您可以选取若干个路径。

    1K10编辑于 2022-04-07
  • 来自专栏ceshiren0001

    深入解析AppCrawler:开源自动遍历测试工具配置指南

    given: []    when: null    then: []    xpath: "//*[contains(name(), 'Text') and @clickable='true' and string-length given: []    when: null    then: []    xpath: "//*[@clickable='true']//*[contains(name(), 'Text') and string-length ='' and string-length(@label)<10]"    action: ""    actions: []    times: -1  - given: []    when: null given: []    when: null    then: []    xpath: "//*[contains(@class, 'Text') and @clickable='true' and string-length given: []    when: null    then: []    xpath: "//*[@clickable='true']//*[contains(@class, 'Text') and string-length

    20310编辑于 2025-09-28
  • 来自专栏muller的测试分享

    软件测试|AppCrawler 自动遍历测试实践

    0- given: [] when: null then: [] xpath: "//*[contains(name(), 'Text') and @clickable='true' and string-length : 0- given: [] when: null then: [] xpath: "//*[@clickable='true']/*[contains(name(), 'Text') and string-length ='' and string-length(@label)<10]" action: null actions: [] times: 0原始文件中将所有可点击的控件类型都包括了进去,再加上了部分

    1.3K30编辑于 2023-01-04
  • 来自专栏测吧测试开发

    利器 | AppCrawler 自动遍历测试实践(三):动手实操与常见问题汇总

    given: [] when: null then: [] xpath: "//*[contains(name(), 'Text') and @clickable='true' and string-length - given: [] when: null then: [] xpath: "//*[@clickable='true']/*[contains(name(), 'Text') and string-length ='' and string-length(@label)<10]" action: null actions: [] times: 0 原始文件中将所有可点击的控件类型都包括了进去,再加上了部分

    98110编辑于 2022-05-26
  • 来自专栏北京马哥教育

    30个示例手把手教你学会Xpath高级用法

    string-length:返回指定字符串的长度 ? 组合拳2 ? or:多条件匹配 ? 组合拳3:floor + div除法 + ceiling ?

    2.1K50发布于 2018-05-03
  • 来自专栏云优惠券

    BSL编程语言 —— 系统化程序设计

    对于字符串的主要操作 (string-append "hello" "_" "world") ; 连接字符串,返回"hello_world" (string-length "hello")

    1.7K10发布于 2019-06-20
  • 来自专栏若城技术专栏

    爬虫入门指南(1):学习爬虫的基础知识和技巧

    判断一个字符串是否以另一个字符串结束 xpath_expression = 'ends-with("Hello World", "World")' # 获取字符串的长度 xpath_expression = 'string-length string-length():获取字符串的长度。 normalize-space():移除字符串两端的空白字符并压缩中间的空白字符。 count():计算节点的数量。

    1.4K10编辑于 2024-02-29
  • 来自专栏北京宏哥

    《手把手教你》系列技巧篇(十六)-java+ selenium自动化测试-元素定位大法之By xpath下卷(详细教程)

    ] #使用字符内容来辅助定位 5.not:布尔值(否) 'count(//li[not(@data)])' #不包含data属性的li标签统计 6.string-length:返回指定字符串的长度 #string-length 函数+local-name函数定位节点名长度小于2的元素 '//*[string-length(local-name())<2]/text()')[0] 7.组合拳2 #contains函数+local-name

    2.7K30发布于 2021-08-18
  • 来自专栏.NET 全栈开发专栏

    学会XPath,轻松抓取网页数据

    函数:XPath提供了一些内置的函数,如count(),concat(),string(),local-name(),contains(),not(),string-length()等,可以用于处理和操作节点和属性

    2K10编辑于 2023-11-30
  • 来自专栏哈哈熊

    【Python爬虫】使用request和xpath爬取高清美女图片

    string-length(): 返回字符串的长度。 substring(string, start, length): 返回字符串的子字符串。

    69010编辑于 2024-05-13
  • 来自专栏黄啊码【CSDN同名】

    基于解析器组合子的语法解析器(上)

    (string-length tkn)) (char-alphabetic?

    3.4K50编辑于 2022-06-20
  • 来自专栏Nodejs技术栈

    Github 4 万 Star!最全面的 Node.js 资源汇总推荐

    JavaScript 中的图像处理 probe-image-size - 无需完全下载即可获取大多数图像格式的大小 qrcode - 二维码和条形码生成器 文本 iconv-lite - 转换字符编码. string-length

    4.7K31发布于 2021-01-13
  • 来自专栏全栈程序员必看

    signature=0fdde99449705347b1bc3148e0519684,yarn.lock · mirrors_yeoman/generator-generator – Gitee.co

    2.3.11” node-notifier “^5.2.1” prompts “^0.1.9” realpath-native “^1.0.0” rimraf “^2.5.4” slash “^1.0.0” string-length d2e28ce74f8dad6c6afc922b92cabef6ed05c91c” integrity sha1-0uKM50+NrWxq/JIrksq+9u0FyRw= dependencies: ansi-escapes “^3.0.0” chalk “^2.0.1” string-length 2sMECGkMIfPDYwo/86BYd73L1zY= string-length@^2.0.0: version “2.0.0” resolved “https://registry.yarnpkg.com/string-length

    60110编辑于 2022-10-02
领券