I have tried using below syntax:
page.body.index('Name') < page.body.index('Phone')
But problem is that if there are multiple strings with same content on same page, then unable to check the index of particular string.
For ex. Page is having content 'Name' and 'Phone' 3 times, then how specific content's order can be verified.
Please suggest if we can use CSS syntax for the same or any other better way.