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
All Implemented Interfaces:
WebConstants

Deprecated. Use WebMenu instead

@Deprecated
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.


Field Summary
 
Fields inherited from interface com.ibm.team.fvt.tests.web.WebConstants
DISABLED, ENABLED, FALSE, NAME, OK, TAG_NAME_H1, TITLE, TRUE
 
Constructor Summary
WebPopupMenuElement(WebPage page)
          Deprecated.  
WebPopupMenuElement(WebPage page, org.openqa.selenium.By findBy)
          Deprecated.  
WebPopupMenuElement(WebPage page, org.openqa.selenium.By findBy, java.lang.String frame)
          Deprecated.  
WebPopupMenuElement(WebPage page, WebBrowserElement parentElement)
          Deprecated.  
 
Method Summary
 void clickItem(java.lang.String item)
          Deprecated. Click on item element found using the given search mechanism.
 WebBrowserElement getItemElement(java.lang.String item)
          Deprecated. Return the web element for the item matching the given text.
 WebBrowserElement getItemElement(java.lang.String item, boolean visible)
          Deprecated. Return the web element for the item matching the given text.
 java.util.List<WebBrowserElement> getMenuOptions()
          Deprecated. Returns the list of Menu option elements within this popup menu.
 java.util.List<java.lang.String> getStringMenuOptions(boolean shouldClose)
          Deprecated. Returns the list of Menu option elements within this popup menu.
 WebBrowserElement open(WebBrowserElement webElement)
          Deprecated. 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 com.ibm.team.fvt.tests.web.WebElementWrapper
getText
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebPopupMenuElement

public WebPopupMenuElement(WebPage page)
Deprecated. 

WebPopupMenuElement

public WebPopupMenuElement(WebPage page,
                           org.openqa.selenium.By findBy)
Deprecated. 

WebPopupMenuElement

public WebPopupMenuElement(WebPage page,
                           org.openqa.selenium.By findBy,
                           java.lang.String frame)
Deprecated. 

WebPopupMenuElement

public WebPopupMenuElement(WebPage page,
                           WebBrowserElement parentElement)
Deprecated. 
Method Detail

clickItem

public void clickItem(java.lang.String item)
Deprecated. 
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)
Deprecated. 
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)
Deprecated. 
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.

getMenuOptions

public java.util.List<WebBrowserElement> getMenuOptions()
Deprecated. 
Returns the list of Menu option elements within this popup menu. Menu options are identified as having ids starting with 'jazz_ui_menu_MenuItem' or 'dijit_MenuItem'.

Returns:
A list of WebElements representing the menu items

getStringMenuOptions

public java.util.List<java.lang.String> getStringMenuOptions(boolean shouldClose)
Deprecated. 
Returns the list of Menu option elements within this popup menu. Menu options are identified as having ids starting with 'jazz_ui_menu_MenuItem' or 'dijit_MenuItem'. Note this will close the menu.

Parameters:
shouldClose - - true if we should close the menu after providing the list
Returns:
A list of WebElements representing the menu items

open

public WebBrowserElement open(WebBrowserElement webElement)
Deprecated. 
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.