how to retrieve z-index of a divTag : Automation API

how to retrieve z-index of a divTag

Class library usage, coding and language questions.

how to retrieve z-index of a divTag

Postby hobli » Tue Jun 29, 2010 9:39 am

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>
hobli
 
Posts: 57
Joined: Thu Jul 30, 2009 2:15 am

Re: how to retrieve z-index of a divTag

Postby Support Team » Tue Jun 29, 2010 9:52 am

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
User avatar
Support Team
Site Admin
 
Posts: 4289
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria


Return to Automation API

Who is online

Users browsing this forum: No registered users and 0 guests