The findInPage() method is used to find matching string values in the pages contents at the window level for container application applications that or at the view level for platform applications. On first occurrence of this method all matching strings will be highlighted in yellow (default colour) and the first entry will be highlighted in orange. With each successive use of this method the orange highlight will move to the next matching string.
The direction of the search order and which elements to use next is controlled by "forward" and "findNext" options in the FindInPageOptions object. These are:
"forward" = highlight the next matching string on the page to the one that is currently highlighted.
"findNext" = set this to true for a new search (if a new search string is entered or to start again from the beginning) or set to false to enable moving the orange highlight to the next matching string in the direction specified by the "forward" option.
*** Note *** If you have matching string within iframe's in the pages content all elements will get highlighted in yellow. However on subsequent uses of the method to iterate over matching strings to orange highlight will go to all of the matching string in the main pages content before it will start to highlight matching strings in the iframe's content.