jeudi 18 novembre 2021

How to locate all checkbox items which contains subtext "yes" in Appium?

Image Please check, Image above

I have problems to locate only "yes" Items in Appium. So if I have tried:

Xpath: //[@resource-id='com.example.appfortestautomation:id/section3']//[@resource-id='com.example.appfortestautomation:id/sectionBoxes']/android.view.ViewGroup//*[contains(@text, 'Item') and not(contains(@text(),'no'))]

Xpath: //[@resource-id='com.example.appfortestautomation:id/section3']//[@resource-id='com.example.appfortestautomation:id/sectionBoxes']/android.view.ViewGroup//[contains(@text, 'Item') and not(contains(@text,'no'))]

It seems that not contains does not work in this case.

How could I get this? Using XPath or a regex? I am a bit without ideas on that...




Aucun commentaire:

Enregistrer un commentaire