繁体   English   中英

在 xpath 中使用正则表达式查找特定模式

[英]Finding a specific pattern using regex in xpath

我想在 xpath 中使用正则表达式查找特定文本。

这是我的 xpath:

locator: //*[@class = 'android.widget.TextView' and contains(@text,'PriceBottomBarDialog-selector')]

这个“PriceBottomBarDialog-selector”保持不变,开始的文本不断变化。 任何人都可以请帮助正则表达式模式吗?

谢谢

你很亲密。 您需要修复并且可以使用定位器策略

  • Xpath:

     locator: //*[@class = 'android.widget.TextView' and contains(.,'PriceBottomBarDialog-selector')]

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM