Taking x co-ordinate Position of Web elements

I wish to check alignment of label and its corresponding text box so I need x-ordinate position of that both. For this problem Mobile application have getElementTopPosition. But for Web application have not this type of element. So what I do

You can derive the element top position from the getRect() object (Rectangle)

Code snippit
def eleto = WebUI.findWebElement(to, 30)
Int iheight = eleto.getRect().height
int iwidth = eleto.getRect().width
int ix = eleto.getRect().getX()
int iy = eleto.getRect().getY()

What you can do is embed it in your testscript or create a custom function out of it. good luck

Thank You Very Much Sir…