Why does webdriveio getText method return an array?

568 Views Asked by At

The documentation on the website indicates it is supposed to return a string. Is the array representative of each element found? Or is it a bug?

1

There are 1 best solutions below

0
On

Hard to confirm without seeing the actual code used, but if you send a selector that matches multiple elements, it will return an array of strings for each element.