1 Answer

0 votes
by (20.8k points)
ElementArrayFinder is used for operations on an array of elements. The ElementArrayFinder is used to set up a chain of conditions that identify an array of elements. In particular, you can call all(locator) and filter(filterFn) to return a new ElementArrayFinder modified by the conditions, and you can call get(index) to return a single ElementFinder at position ‘index’.

Similar to jquery, ElementArrayFinder will search all branches of the DOM to find the elements that satisfy the conditions (i.e. all, filter, get). However, an ElementArrayFinder will not actually retrieve the elements until an action is called, which means it can be set up in helper files (i.e. page objects) before the page is available, and reused as the page changes.

Related questions

0 votes
asked Apr 5, 2021 in Protractor by Robindeniel (20.8k points)