|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.team.fvt.tests.web.WebPage
com.ibm.team.fvt.tests.clm.pages.ClmWebPage
public abstract class ClmWebPage
Manage all common actions to any CLM application web page.
This kind of page always have a title, hence it's loaded (see isLoaded()
,
load()
and waitForTitle(boolean)
) when the title web element
is found and its text equals to the expected title (see getExpectedTitle()
).
The first thing that all CLM web page have in common is the Home Menu. Using this menu, users are able to access any application project area. It can also directly jump to the JTS Admin Home page and the LPA All Projects page.
This class provides access to the following CLM web pages through the Home Menu:
gotoCcmProjectPage(String)
: Go to the CCM project dashboard
page using Change and Configuration Management -> projectName
menu item of the Home menu.gotoCcmProjectPage(String, String)
: Go to the CCM project dashboard
page using Change and Configuration Management -> projectName
menu item of the Home menu.gotoJtsAdminHomePage()
: Go to the JTS Admin Home page using
Administration -> Jazz Team Server Home menu item of the Home
menu.gotoLpaAllProjectsPage()
: Go to the LPA All Projects Home page
using Administration -> Lifecycle Project Administration menu item
of the Home menugotoQmProjectPage(String, String)
: Go to the QM project dashboard page
using Quality Management -> projectName menu item of the
Home menu.gotoQmProjectPage(String, String)
: Go to the QM project dashboard page
using Quality Management -> projectName menu item of the
Home menu.gotoRmProjectPage(String)
: Go to the RM project dashboard page
using Requirement Management -> projectName menu item of
the Home menugotoRmProjectPage(String, String)
: Go to the RM project dashboard page
using Requirement Management -> projectName menu item of
the Home menuIt also provides some information or functionalities available on any CLM web pages accessible at this hierarchy level:
getBannerTitle()
: Return the current CLM page banner title.getConfig()
: Return the configuration associated with the current
page.getUser()
: Return the user used when the page was loaded.logout(User)
: Logout the current user from the current CLM page.refresh()
: Refresh the page content.save()
: Save changes done in the current web page.It also provides easy access to menus information:
openHomeMenu()
: Open the Home Menu and return the corresponding object.openMenu(By, By)
: Open a menu by clicking on the link element
found using the given search mechanism. The opened menu is found using the
given search mechanism.openMenu(String, By)
: Open a menu by clicking on the link element
found using the given id. The opened menu is found with the given search
mechanism.openToolbarMenu(String, By)
: Open a CLM toolbar menu by clicking
on the link element found using the given id. The opened menu is found with
the given search mechanism.openUserProfileMenu()
: Open the Users menu and return the corresponding object.It also provides some high level actions or functionalities common to all CLM pages:
checkRichHover(String, Class, String...)
: Check the rich hover title
of the given resource found in the current page.Additionally, it also provides some common code that subclasses can use in separated branches of the hierarchy tree:
getResourceLinkElements(WebBrowserElement)
: Return the list of
resource link elements displayed in the current page.getSaveButtonXpath()
: Return the xpath for the save button.initPageInformation()
: Initialize page information.isLoaded()
: Return whether the page is currently loaded or not.load()
: Load the current page into the browser.waitForExpectedTitle()
: Wait for the expected title.waitForLoadingPageEnd()
: Wait for the page loading to be finished.waitForResourceLinkElement(WebBrowserElement, String)
: Wait
until the resource link web element is found in the current page.waitForSavingEnd()
: Wait for the end of the saving operation.waitForStatusMessage(int)
: Wait for the status message to be
displayed in the current CLM page.waitForTitle(boolean)
: Wait for the title to be displayed in the
current CLM page.Finally, it provides some useful methods to easily access configuration information:
getApplication()
: Return the application associated with
the current page.getCcmApplication()
: Return the CCM application.getExpectedTitle()
: The expected title for the page.getJtsApplication()
: Return the JTS application.getLpaApplication()
: Return the LPA application.getQmApplication()
: Return the QM application.getRmApplication()
: Return the RM application.getTitle()
: Return the current page title.getTopology()
: Return the current test topology that the current
page belongs to.
Field Summary |
---|
Fields inherited from class com.ibm.team.fvt.tests.web.WebPage |
---|
NO_DATA |
Fields inherited from interface com.ibm.team.fvt.tests.clm.pages.ClmWebPageConstants |
---|
ADMINISTRATION_HOME_MENU_GROUP, JAZZ_TEAM_SERVER_HOME_MENU_ITEM, LIFECYCLE_PROJECT_ADMIN_MENU_ITEM, USER_NOT_AUTHORIZED_MESSAGE_ID, USER_NOT_AUTHORIZED_MESSAGE_LOCATOR |
Constructor Summary | |
---|---|
ClmWebPage(java.lang.String url,
ClmConfig config,
com.ibm.team.fvt.tests.config.User user,
java.lang.String... data)
|
Method Summary | ||
---|---|---|
|
checkRichHover(java.lang.String resource,
java.lang.Class<RH> hoverClass,
java.lang.String... additionalData)
Check the rich hover title of the given resource found using the waitForResourceLinkElement(WebBrowserElement, String) method. |
|
|
clickHomeMenuItem(java.lang.String group,
java.lang.String itemName,
java.lang.Class<P> pageClass,
java.lang.String... info)
Click on the given Home Menu item. |
|
java.lang.String |
getBannerTitle()
Return the current CLM page banner title. |
|
CcmApplication |
getCcmApplication()
|
|
ClmConfig |
getConfig()
|
|
DmApplication |
getDmApplication()
|
|
JtsApplication |
getJtsApplication()
|
|
LpaApplication |
getLpaApplication()
|
|
ClmMiniDashboard |
getMiniDashboard(boolean expanded)
Get the mini-dashboard. |
|
QmApplication |
getQmApplication()
|
|
ClmApplication |
getRmApplication()
|
|
java.lang.String |
getTitle()
Return the title of the page. |
|
ClmUser |
getUser()
|
|
CcmWebProjectDashboardPage |
gotoCcmProjectPage(java.lang.String projectName)
Go to the CCM project dashboard page using Change and Configuration Management -> projectName menu item. |
|
CcmWebProjectDashboardPage |
gotoCcmProjectPage(java.lang.String projectName,
java.lang.String dashboardName)
Go to the CCM project dashboard page using Change and Configuration Management -> projectName menu item. |
|
DmWebProjectDashboardPage |
gotoDmProjectPage(java.lang.String projectName)
Go to the DM project dashboard page using Design Management -> projectName menu item. |
|
DmWebProjectDashboardPage |
gotoDmProjectPage(java.lang.String projectName,
java.lang.String dashboardName)
Go to the DM project dashboard page using Design Management -> projectName menu item. |
|
JtsAdminHomePage |
gotoJtsAdminHomePage()
Go to the JTS Admin Home page using Administration -> Jazz Team Server Home menu item. |
|
LpaWebAllProjectsPage |
gotoLpaAllProjectsPage()
Go to the LPA All Projects Home page using Administration -> Lifecycle Project Administration menu item. |
|
QmWebProjectDashboardPage |
gotoQmProjectPage(java.lang.String projectName)
Go to the QM project dashboard page using Quality Management -> projectName menu item. |
|
QmWebProjectDashboardPage |
gotoQmProjectPage(java.lang.String projectName,
java.lang.String dashboardName)
Go to the QM project dashboard page using Quality Management -> projectName menu item. |
|
RmWebProjectDashboardPage |
gotoRmProjectPage(java.lang.String projectName)
Go to the RM project dashboard page using Requirement Management -> projectName menu item. |
|
RmWebProjectDashboardPage |
gotoRmProjectPage(java.lang.String projectName,
java.lang.String dashboardName)
Go to the RM project dashboard page using Requirement Management -> projectName menu item. |
|
boolean |
logout(com.ibm.team.fvt.tests.config.User newUser)
Logout the current user from the current CLM page. |
|
ClmMenu |
openAdminUIMenu()
Open the Administration menu. |
|
ClmMenu |
openHelpMenu()
Open the Help menu. |
|
ClmHomeMenu |
openHomeMenu()
Open the Home Menu. |
|
ClmMenu |
openMenu(org.openqa.selenium.By menuBy,
org.openqa.selenium.By linkBy)
Open a menu by clicking on the link element found using the given search mechanism. |
|
ClmMenu |
openMenu(java.lang.String menuId,
org.openqa.selenium.By linkBy)
Open a menu by clicking on the link element found using the given id. |
|
ClmToolbarMenu |
openToolbarMenu(java.lang.String menuId,
org.openqa.selenium.By linkBy)
Open a CLM toolbar menu by clicking on the link element found using the given id. |
|
ClmMenu |
openUserProfileMenu()
Open the Users menu and return the corresponding object. |
|
void |
refresh()
|
|
boolean |
save()
Save changes done in the current web page. |
|
void |
waitWhileBusy()
Wait while the page is busy. |
Methods inherited from class com.ibm.team.fvt.tests.web.WebPage |
---|
changeUser, checkHoverTitle, checkRichHover, get, getBrowser, getLocation, getPage, getPage, getPageUsingBrowser, goBack, openPage, openPage, openPageUsingBrowser, openPageUsingHoverTitle, openPageUsingLink, openPageUsingLink, openPageUsingLink, openPageUsingLink, openPageUsingLink, openPageUsingLink, richHoverOverLink, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ClmWebPage(java.lang.String url, ClmConfig config, com.ibm.team.fvt.tests.config.User user, java.lang.String... data)
Method Detail |
---|
public <RH extends com.ibm.team.fvt.tests.web.WebRichHover<? extends com.ibm.team.fvt.tests.web.WebPage>> RH checkRichHover(java.lang.String resource, java.lang.Class<RH> hoverClass, java.lang.String... additionalData)
waitForResourceLinkElement(WebBrowserElement, String)
method.
This check opens the rich hover by positioning the mouse pointer over the given link element and checks whether its title matches the given text.
RH
- The expected class for the hoverresource
- The resource namehoverClass
- The expected class for the hoveradditionalData
- Additional data to check in the rich hover
WebBrowserElement
com.ibm.team.fvt.tests.scenario.errors.ScenarioFailedError
- in following cases:
WebPage.shortTimeout()
(typically
when the hover is still empty when the timeout is reached)public <P extends ClmWebPage> P clickHomeMenuItem(java.lang.String group, java.lang.String itemName, java.lang.Class<P> pageClass, java.lang.String... info)
itemName
- The Home Menu item to click onpageClass
- The class of the opened page after having clicked on the item
public java.lang.String getBannerTitle()
String
public CcmApplication getCcmApplication()
ClmTopology.getCcmApplication()
public ClmConfig getConfig()
getConfig
in class com.ibm.team.fvt.tests.web.WebPage
ClmConfig
.public DmApplication getDmApplication()
ClmTopology.getDmApplication(boolean)
public JtsApplication getJtsApplication()
ClmTopology.getJtsApplication()
public LpaApplication getLpaApplication()
ClmTopology.getLpaApplication()
public ClmMiniDashboard getMiniDashboard(boolean expanded)
Note that the mini-dashboard is stored in the web page. If it has become stale for any page html content refresh, then it's automatically searched again ensuring that the returned element is ready to be used without any trouble.
expanded
- Tell whether the mini-dashboard should be expanded
when returned or just get it in the current state.
ClmMiniDashboard
.public QmApplication getQmApplication()
ClmTopology.getQmApplication()
public ClmApplication getRmApplication()
ClmTopology.getRmApplication()
public java.lang.String getTitle()
String
.public ClmUser getUser()
getUser
in class com.ibm.team.fvt.tests.web.WebPage
ClmUser
.public CcmWebProjectDashboardPage gotoCcmProjectPage(java.lang.String projectName)
When using this method, it's assumed that the dashboard name is the CCM project name.
projectName
- The project to jump to
CcmWebProjectDashboardPage
public CcmWebProjectDashboardPage gotoCcmProjectPage(java.lang.String projectName, java.lang.String dashboardName)
projectName
- The project to jump todashboardName
- The name of the project dashboard
CcmWebProjectDashboardPage
public DmWebProjectDashboardPage gotoDmProjectPage(java.lang.String projectName)
When using this method, it's assumed that the dashboard name is the DM project name.
Note that a ScenarioFailedError
error will be raised if the scenario
topology is not supposed to includes DM application.
projectName
- The project to jump to
DmWebProjectDashboardPage
public DmWebProjectDashboardPage gotoDmProjectPage(java.lang.String projectName, java.lang.String dashboardName)
Note that a ScenarioFailedError
error will be raised if the scenario
topology is not supposed to includes DM application.
projectName
- The project to jump todashboardName
- The name of the project dashboard
DmWebProjectDashboardPage
public JtsAdminHomePage gotoJtsAdminHomePage()
JtsAdminHomePage
public LpaWebAllProjectsPage gotoLpaAllProjectsPage()
LpaWebAllProjectsPage
public QmWebProjectDashboardPage gotoQmProjectPage(java.lang.String projectName)
When using this method, it's assumed that the dashboard name is the RM project name + " Project Dashboard".
projectName
- The project to jump to
QmWebProjectDashboardPage
public QmWebProjectDashboardPage gotoQmProjectPage(java.lang.String projectName, java.lang.String dashboardName)
projectName
- The project to jump todashboardName
- The name of the project dashboard
QmWebProjectDashboardPage
public RmWebProjectDashboardPage gotoRmProjectPage(java.lang.String projectName)
When using this method, it's assumed that the dashboard name is the RM project name + " Project Dashboard".
projectName
- The project to jump to
RmWebProjectDashboardPage
public RmWebProjectDashboardPage gotoRmProjectPage(java.lang.String projectName, java.lang.String dashboardName)
projectName
- The project to jump todashboardName
- The name of the project dashboard
RmWebProjectDashboardPage
public boolean logout(com.ibm.team.fvt.tests.config.User newUser)
TODO Should be login(User) instead...
logout
in class com.ibm.team.fvt.tests.web.WebPage
public ClmMenu openAdminUIMenu()
WebMenu
.public ClmMenu openHelpMenu()
ClmMenu
.public ClmHomeMenu openHomeMenu()
ClmHomeMenu
.public ClmMenu openMenu(org.openqa.selenium.By menuBy, org.openqa.selenium.By linkBy)
menuBy
- The mechanism to find the menu when openedlinkBy
- The mechanism to find the web element to open the menu
ClmMenu
public ClmMenu openMenu(java.lang.String menuId, org.openqa.selenium.By linkBy)
menuId
- The ID of the popup menulinkBy
- The mechanism to find the web element to open the menu
ClmMenu
public ClmToolbarMenu openToolbarMenu(java.lang.String menuId, org.openqa.selenium.By linkBy)
menuId
- The ID of the popup menulinkBy
- The mechanism to find the web element to open the menu
ClmToolbarMenu
public ClmMenu openUserProfileMenu()
ClmToolbarMenu
public void refresh()
Store that the page has been refreshed. Hence, when used, it's important to reset the flag when possible.
refresh
in class com.ibm.team.fvt.tests.web.WebPage
public boolean save()
Nothing happen if there's nothing to save (ie. if the button is disabled).
This method only works for CLM web pages which have a 'Save' button. Hence, if a subclass wants to use this generic method, it also has to override methods:
getSaveButtonXpath()
: to specify how to search for the 'Save'
buttonwaitForSavingEnd()
: to specify how to wait for the end of the
saving operation.ScenarioFailedError
is raised if one of these methods is
not overridden.
true
if the page was saved, false
if
the save was not necessary.
com.ibm.team.fvt.tests.scenario.errors.ScenarioFailedError
- If the method is not applicable for the current
page (ie. if getSaveButtonXpath()
or waitForSavingEnd()
methods are not overridden).public void waitWhileBusy()
By default the page is busy if the status message is displayed and the timeout
is WebPage.openTimeout()
seconds.
com.ibm.team.fvt.tests.scenario.errors.ScenarioFailedError
- If the timeout is reached while the page is still
busy.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |