cerberus-core icon indicating copy to clipboard operation
cerberus-core copied to clipboard

Can't count element in a node with xpath

Open Nouxx opened this issue 4 years ago • 1 comments

Even if I provide a correct xpath, Cerberus properties (getFromHtml or getFromXml) can't return the result

image

syntax : xpath=count(.//*[@resource-id="com.oxylane.android.cubeinstore.debug:id/resulat_search_dialog_recycler"]/*)

There may be a workaround using getRawXml and then using Groovy size() function but didn't have the time to give it a try.

I'm running a test on an Android native app

Nouxx avatar Oct 26 '20 14:10 Nouxx

I would suggest:

At control level, new controls: verifyElementCountDifferent verifyElementCountEqual verifyElementCountGreater verifyElementCountGreaterOrEqual verifyElementCountMinor verifyElementCountMinorOrEqual

At property level, new types: getCountFromHtml [320] getCountFromJson [710] getCountFromXml [505]

@bcivel OK for you ?

vertigo17 avatar Aug 05 '23 12:08 vertigo17