check a text is before or after another text

Useful to check text order or sorting in a web table
Added comments for each step. Thanks!