I want to check position of some labels in an web application i.e if 2 labels labelX and labelY to be checked, I need to check that labelX appears right of lableY. In some other case need to check labelX appears below labelY.
On object spy it labels are appearing as webelement and the hirearchy is like:
On record it is displaying as:
How I can achive this?
I don't want to use checkpoint as it'll not be generic and I've a lot scenarios where I've to check different fields position.
There was thread couple of days where the issue of Obj spy and OR being raised and was clarified that what gets into the OR(script) need not follow the same heirarchy as shown by the spy.
In your case, I suggest you have a label whose position is baselined and then try to retrieve the co-ordinates of the other label and compare the co-ordinates relative to the first one(be it right , left or below)