I am testing a hybrid application where each view has a web view.
In one of these web views, I have a list of items with the same attribute. They have the same xpath locator, something like:
//h4[contains(@data-role, 'product-name')]
I want to create a list of these elements and iterate over them, count them, get their attributes.
In the documentation, I found two similar methods:
findElement(locator, value)
and
findMultipleElements(locator, value)
Although it is completely incomprehensible to me how to use it. I tried to find examples, but without success.
Can anyone help me with this?
Jenny source
share