Using "storeElementPositionLeft" and "storeElementPositionTop" Commands in selenium

"storeElementPositionLeft" Command

In selenium, Many times you need  horizontal and verticle position of element on page. When you need any element's horizontal position on the page, you can use "storeElementPositionLeft" Command. It will return and store element's horizontal position in to specified veriable in value column.

In Bellow given example, storeElementPositionLeft command will store google search box's horizontal position in to variable "left".

New Test

"storeElementPositionTop" Command

"storeElementPositionTop" Command is useful to store vertical position of an element in to variable. In above wxample, storeElementPositionTop command will store google search box's vertical position in to variable "top".

No comments:

Post a Comment