com.ibm.team.fvt.tests.web
Class WebPopupMenuElement

java.lang.Object
  extended by com.ibm.team.fvt.tests.web.WebPageElement
      extended by com.ibm.team.fvt.tests.web.WebElementWrapper
          extended by com.ibm.team.fvt.tests.web.WebWindow
              extended by com.ibm.team.fvt.tests.web.WebPopupMenuElement

public class WebPopupMenuElement
extends WebWindow

Class to manage popup menus.

Popup menus can be considered like window as they also open by clicking on a web element, usually a menu item or drop-down button.

The open operation looks like a window one but have the peculiarity to check that items are loaded before returning.

Additionally, this generic level offers the ability to click on a item.


Constructor Summary
WebPopupMenuElement(WebPage page)
           
WebPopupMenuElement(WebPage page, By findBy)
           
WebPopupMenuElement(WebPage page, By findBy, java.lang.String frame)
           
 
Method Summary
 void clickItem(java.lang.String item)
          Click on item element found using the given search mechanism.
 WebBrowserElement getItemElement(java.lang.String item)
          Return the web element for the item matching the given text.
 WebBrowserElement getItemElement(java.lang.String item, boolean visible)
          Return the web element for the item matching the given text.
 WebBrowserElement open(WebBrowserElement webElement)
          Open the window by clicking on the given web element.
 
Methods inherited from class com.ibm.team.fvt.tests.web.WebWindow
cancel, close
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebPopupMenuElement

public WebPopupMenuElement(WebPage page)

WebPopupMenuElement

public WebPopupMenuElement(WebPage page,
                           By findBy)

WebPopupMenuElement

public WebPopupMenuElement(WebPage page,
                           By findBy,
                           java.lang.String frame)
Method Detail

clickItem

public void clickItem(java.lang.String item)
Click on item element found using the given search mechanism.

Parameters:
item - The item text to click on

getItemElement

public WebBrowserElement getItemElement(java.lang.String item)
Return the web element for the item matching the given text.

Note that the returned element has to be visible otherwise this method will fail.

Parameters:
item - The item text to click on

getItemElement

public WebBrowserElement getItemElement(java.lang.String item,
                                        boolean visible)
Return the web element for the item matching the given text.

Note that the returned element has to be visible otherwise this method will fail.

Parameters:
item - The item text to click on
visible - Tells whether the return item has to be visible or can be hidden.

open

public WebBrowserElement open(WebBrowserElement webElement)
Open the window by clicking on the given web element.

Open the popup-menu found with the given search mechanism and return the corresponding web element.

Note that the popup-menu is opened by clicking on a link element found using the given search mechanism.

When possible, it also waits for all item to be loaded before returning.

Specified by:
open in class WebWindow
Parameters:
webElement - The element on which to perform the open action.
Returns:
The opened window as a WebWindow subclass.