org.aludratest.service.gui.web.selenium.selenium2
Class ZIndexSupport

java.lang.Object
  extended by org.aludratest.service.gui.web.selenium.selenium2.ZIndexSupport

public class ZIndexSupport
extends Object

Performs z-index calculations with Selenium 2. author Marcel Malitz

Author:
Volker Bergmann

Constructor Summary
ZIndexSupport(org.openqa.selenium.WebDriver driver)
           
 
Method Summary
 int getCurrentZIndex(org.openqa.selenium.WebElement element)
          To get the z-index (defined in the attribute "style") for the operated element.
 int getMaxZIndex()
          To get the biggest value of z-index for all of the elements on current page.
 boolean isInForeground(org.openqa.selenium.WebElement element)
          Checks if a element is blocked by a modal dialog.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZIndexSupport

public ZIndexSupport(org.openqa.selenium.WebDriver driver)
Method Detail

isInForeground

public boolean isInForeground(org.openqa.selenium.WebElement element)
Checks if a element is blocked by a modal dialog.


getCurrentZIndex

public int getCurrentZIndex(org.openqa.selenium.WebElement element)
To get the z-index (defined in the attribute "style") for the operated element. There are 3 possibilities for retrieving z-index:
1) If a z-index is defined for this element or its ancestor, then return this value
2) If no z-index is defined for this element and its ancestor, then use the base z-index for this page
3) For an element of the type "LabelLocator", the base z-index will be returned

Parameters:
element - The element to check.
Returns:
current z-Index

getMaxZIndex

public int getMaxZIndex()
To get the biggest value of z-index for all of the elements on current page. The element with the biggest value of z-index will be shown in foreground. The elements with the lower value of z-index will be shown in background.

Returns:
the biggest value of z-index on current page


Copyright © 2014 aludratest.org. All rights reserved.