Page 1 of 1

how to retrieve z-index of a divTag

Posted: Tue Jun 29, 2010 8:39 am
by hobli
Hi,

I would like to check the z-index of div layers in a webpage, the web page is using style attribute z-index of div to define it's layer position (z index), could you pls provide me any hint on how to retrieve this attribute value from divTag?

thanks a lot

Code: Select all

<div style="z-index: 4" id="mydiv">this is my layer</div>

Re: how to retrieve z-index of a divTag

Posted: Tue Jun 29, 2010 8:52 am
by Support Team
Hi,

There are two ways to get the style attribute of your tag.
First you can use the indexer of your WebElement
yourTag["yourAttribute"];
http://www.ranorex.com/Documentation/Ra ... t_Item.htm

or you can use the GetAttributeValue() method of the Element class
yourTag.Element.GetAttributeValue("yourAttribute");
http://www.ranorex.com/Documentation/Ra ... eValue.htm

Regards,
Peter
Ranorex Support Team