簡體   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