Oracle® Functional Testing OpenScript Programmer's Reference Release 13.3.0.1 E37832-12 |
|
![]() Previous |
![]() Next |
This chapter explains how to use the Siebel OpenUI function library and provides a complete listing and reference for the methods in the OpenScript Siebel OpenUI Function Library Application Programming Interface (API).
The Siebel Open UI function library is an add-on feature to the OpenScript functional testing product. The Siebel OpenUI function library can be used to enhance testing capabilities of Web Functional testing scripts used to test applications based on the Siebel OpenUI platform. If you are testing Siebel applications that use Standard Siebel High Interactivity (HI) and Standard Interactivity (SI) components, you should use the Siebel Functional test module instead. See Chapter 19, "Siebel Functional Module" for information.
The Siebel OpenUI function library must be downloaded and added to your test script repository after the OpenScript platform is installed.
To use the Siebel OpenUI function library:
Download the Siebel OpenUI function library zip file from:
http://www.oracle.com/technetwork/oem/downloads/index-084446.html
Unzip the Siebel OpenUI function library zip file into your OpenScript repository directory. For example: C:\OracleATS\OFT.
Create a Web Functional test script for your Siebel OpenUI testing project.
Add the Siebel OpenUI function library as a script asset of the Web Functional test script:
Click the Assets tab of the Web Functional test script.
Click Add and select Script.
Select the FunctionLib
script that you unziped from the Siebel OpenUI function library download zip.
Record actions and add functions from the Siebel OpenUI function library to test Call center applications with automation set to On (Siebel server side parameter "EnableAutomation" is set to "True". Sample url: http://server.example.com/callcenter_enu/start.swe?SWECmd=AutoOn).
Add functions to your script using the Add option on the Script menu.
Insert code from the Siebel OpenUI function lbrary in the Java Code view. Type functionLib.
in the code view to access the functions in the library.
The following section provides an alphabetical listing of the enums in the OpenScript Siebel OpenUI Function Library API.
The following table lists the Siebel OpenUI Function Library Enums in alphabetical order.
Table 21-1 List of Siebel OpenUI Function Library Enums
Enum | Description |
---|---|
CommunicationtoolbarGetROproprty |
Gets the Communicationtoolbar ROproprty attributes |
|
Get the ROPropertyApplet attributes |
|
Get the ROPropertyBtn attributes |
|
Get the ROPropertyCheckbox attributes |
|
Get the ROPropertyImage attributes |
|
Get the ROPropertyLink attributes |
|
Get the ROPropertyPDQ attributes |
|
Get the ROPropertyScreen attributes |
|
Gets the ROPropertyText attributes |
|
Gets the ViewGetROProperties attributes |
|
Get the ROPropertyAdvancedEdit attributes |
|
List of months in three-letter format |
|
Get the pagetabs ROProperty attributes |
|
Gets the picklist ROProperty attributes |
|
Sets the screen view level values |
The following section provides an alphabetical listing of the methods in the OpenScript Siebel OpenUI Function Library API.
The following table lists the Siebel OpenUI Function Library API methods in alphabetical order.
Table 21-2 List of Siebel OpenUI Function Library Methods
Method | Description |
---|---|
|
Gets the active tree item in the specified Applet. |
functionLib.ApplicationMenuClick |
Performs click action on the Application Menu Links. |
|
Collapses the object specified by String ID. |
|
Gets the text value of the target HTML element defined by the xpath. |
|
Gets the level at which the Current row exists in the Hierarchial List Applet. |
|
Gets the parent ID of the Specified row in the Hierarchial List Applet. |
|
Drill down the specified object row of the List Applet. |
|
Expands the object specified by String ID. |
|
Gets the child count of the object specified by String ID. |
|
Gets the name of the tree item specified by String ID. |
|
Collapses the specified row in the Hierarchial List Applet. |
|
Expands the specified row in the Hierarchial List Applet. |
|
Detects whether the object specified by String ID is selected or not. |
|
Launches the browser and logs into the Application. |
|
Navigates to the Screen/View from SiteMap. |
|
Go to the next page of the specified Applet. |
|
Gets the number of the next month. |
|
Go to the previous page of the specified Applet. |
|
Gets the number of the previous month. |
|
Sets the value of the input in the specified cell. |
|
Sets the text when the field has same repository name across multiple applets in same screen and modifies or renames the text in the text field. |
|
Gets the specified attribute ( |
|
Activates a row in the list. |
|
Gets the repository name of the current view. |
|
Gets the active row number in the specified Applet. |
|
Gets the specified attribute ( |
|
Gets the specified attribute ( |
functionLib.advancededitGetRoProperty |
Gets the |
|
Gets the |
|
Gets the Applet count under the current screen. |
functionLib.appletGetROProperty |
Gets the specified attribute ( |
functionLib.appletRepositoryName |
Gets the Repository Name of the active Applet. |
|
Gets the UI name of the active Applet. |
|
Gets the |
functionLib.buttonGetRoProperty |
Gets the specfied attribute ( |
|
Gets the |
functionLib.buttonRepositoryName |
Gets the |
|
Gets the |
|
Clicks on any button with specified repository name in the List or Form Applet. |
functionLib.calculatorClassName |
Gets the specified attribute ( |
functionLib.calculatorGetROProperty |
Gets the specfied attribute ( |
functionLib.calculatorIsEnabled |
Detects whether the calculator object is enabled or disabled. |
|
Detects whether the specified calculator popup is open or closed. |
functionLib.calculatorRepositoryName |
Gets the specified attribute ( |
|
Gets the |
|
Gets the specified attribute ( |
|
Gets the day value of the calendar object in the Form Applet. |
|
Clicks on the day link in the Calender object/popup in Form Applets. |
functionLib.calendarDayListApplet |
Gets the calendar day value in the List Applet. |
|
Detects whether the specified calendar popup is open or closed. |
|
Gets the month of the calendar object for the Form Applet. |
functionLib.calendarMonthListApplet |
Gets the calendar month value in the List Applet. |
|
Gets the year value of the Calendar object in the Form Applet. |
functionLib.calendarYearListApplet |
Gets the calendar year value in the List Applet. |
|
Gets the |
functionLib.calenderGetROProperty |
Gets the specfied attribute ( |
|
Detects whether the calendar object is enabled or disabled. |
|
Gets the |
|
Gets the |
|
Gets the |
functionLib.checkboxGetROProperty |
Gets the specified attribute( |
functionLib.checkboxRepositoryName |
Gets the rn attribute of the target HTML element defined by the xpath. |
|
Clicks the Done button in the Calender popup in List or Form Applets. |
|
Clicks the Now button in the Calender popup in List or Form Applets. |
|
Gets the number of currently visible columns in the list (determined by show more/less). |
functionLib.commToolbarClassname |
Gets the |
functionLib.commToolbarGetRoProperty |
Gets the |
functionLib.commToolbarIsEnabled |
Detects whether or not the communication toolbar object is enabled from the target HTML element defined by the xpath. |
functionLib.commToolbarRepositoryname |
Gets the |
functionLib.commToolbarShowButtonToolTip |
Gets the |
|
Gets the |
|
Gets the |
|
Gets the |
|
Gets the |
|
Returns the Currency Code value of the currency field in the List Applet. |
functionLib.currencyCodeClassName |
Gets the |
|
Gets the |
functionLib.currencyGetROProperty |
Gets the specified attribute ( |
|
Detects whether the currency object is enabled or disabled. |
|
Detects whether the specified Currency popup is open or closed. |
functionLib.currencyRepositoryName |
Gets the |
|
Gets the |
functionLib.dialogGetROProperty |
Gets the specified attribute ( |
|
Extracts and returns the ID attribute value of the given Xpath. |
|
Sets focus to the target HTML element defined by the path. |
|
Gets the form record number. |
|
Generate the ID from the given row. |
|
Gets the text for a specified cell when the cell has same repository name across multipal applets in same screen. |
|
Gets the number of the specified month. |
|
Gets the equivalent month for the corresponding number. |
functionLib.getPageTabRepositoryName |
Gets the |
functionLib.getPageTabRepositoryNameByIndex |
Gets the |
|
Gets the |
|
Gets the color of the icon in the List Applet. |
functionLib.imageGetRoProperty |
Gets the |
|
Detects whether pecified Calculator popup is opened or closed. |
|
Detects whether the Calendar is opened or closed. |
|
Detects whether or not the specified checkbox object is checked for the List Applet. |
|
Detects whether the specified checkbox object is enabled or disabled for the List Applet. |
|
Detects wheather the specified column exist or not in the List Applet. |
|
Detects the the state of table column, where state is the value of the column's disabled or read-only property. |
|
Detects whether the object specified by String ID is expanded or not. |
functionLib.isHierarchialListExpanded |
Detects if the specified row is expanded or not in the Hierarchial List Applet. |
|
Detects whether or not the current Applet represents a popup Applet. |
|
Detects whether the specified object is required or not. |
|
Gets the specified number of views of the target HTML element defined by the path. |
|
Gets the |
|
Writes the specified message String to a results log file. |
|
Creates unique record by appending the date and time to the record passed as argument. |
|
Gets the number of menu items from the Applet Level Menu object. |
|
Gets the |
|
Clicks and selects the item from the menu list. |
|
Detects whether or not the specified menu object or menu item is enabled. |
|
Detects whether or not the specified menu object or menu item exists. |
functionLib.menuItemGetRepositoryName |
Gets the |
|
Gets the |
functionLib.menuItemRepositoryName |
Gets the |
|
Gets the equivalent month for the corresponding string value from the Document Object Model(DOM). |
|
Gets the |
|
Clicks on the element inside the specified cell. |
|
Waits until classname siebui-busy is active. |
|
Opens the pop up for the specified field in the List Applet. |
functionLib.pageTabActiveScreen |
Gets the |
|
Detects whether or not the specified Pagetab object exists. |
functionLib.pagetabsGetROProperty |
Gets the specified attribute ( |
|
Gets a data value representing the visible query title of the target HTML element defined by the xpath. |
|
Gets the class name of the target HTML element defined by the path. |
|
Gets the specified attribute ( |
|
Detects the number of objects of a given type that are present in the current context. |
|
Gets the |
|
Gets the |
|
Detects whether or not the specified PDQ object exists. |
functionLib.pickListActiveItem |
Gets the value representing the currently selected item from the Picklist. |
|
Gets the class attribute of the target HTML element defined by the xpath. |
|
Gets the number of items are present in the Picklist object for the List Applet. |
functionLib.pickListGetROProperty |
Gets the specfied attribute ( |
|
Detects whether the PickList object is enabled or disabled. |
functionLib.pickListRepositoryName |
Gets the |
|
Set text to target Picklist element. |
|
Gets the |
functionLib.picklistItemIsExist |
Detects the existence of the Picklist item in the given LOV list. |
|
Specifies the number of rows (visible/invisible) in the List Applet. |
|
Gets the number of currently visible rows (determined by show more/less). |
|
Gets the |
|
Gets the screen count present in the current context. |
functionLib.screenGetRepositoryName |
Gets the |
functionLib.screenGetRoProperty |
Gets the |
functionLib.screenRepositoryName |
Gets the |
|
Gets the |
|
Clicks on the element inside the specified cell. |
|
Selects the tree object specified by String ID. |
|
Sets text to the specified cell (textarea) in the list. |
functionLib.siebScreenActiveView |
Gets the |
functionLib.siebScreenViewsIsExists |
Detects whether the specified view exists or not. |
functionLib.sitemapFilterTextIsExists |
Detects whether or not the filtered count for the entered text is displayed on the sitemap screen on sitemap search operation. |
|
Detects whether or not the sitemap screen is displayed on click of sitemap icon. |
|
Clicks on the link available on the Sitemap screen. |
functionLib.sitemapScreen2ndLevelViewCount |
Gets the number of 2nd level views present for a particular screen. |
functionLib.sitemapScreen3rdLevelViewCount |
Gets the number of 3rd level views present for a particular screen. |
functionLib.sitemapScreen4thLevelViewCount |
Gets the number of 4th level views present for a particular screen. |
functionLib.sitemapSearchBoxCount |
Gets the count of the number of occurrences of the specified text in the sitemap search box. |
functionLib.sitemapSearchBoxIsExists |
Detects whether or not the searchbox field exists in the sitemap screen. |
|
Sorts the table in descending order based on the contents of the specified column. |
|
Sorts the table in ascending order based on the contents of the specified column. |
functionLib.staticDialogGetROProperty |
Gets the specified attribute ( |
functionLib.staticDialogGetVisibleText |
Gets the text attribute of the Confirm or Alert dialog box, if one exists. |
|
Gets the class attribute of the target HTML element defined by the xpath. |
functionLib.textAreaGetROProperty |
Gets the specfied attribute ( |
functionLib.textAreaRepositoryName |
Gets the |
|
Gets the text value of the target HTML element defined by the xpath. |
|
Gets the |
|
Gets the class attribute of the target HTML element defined by the xpath. |
|
Gets the specfied attribute ( |
|
Detects whether the Text object is enabled or disabled from the target HTML element defined by the xpath. |
|
Detects the type of popup associated with the textbox from the target HTML element defined by the xpath. |
functionLib.textRepositoryName |
Gets the |
|
Gets the text value of the target HTML element defined by the xpath. |
|
Gets the |
|
Detects whether the Textarea object is enabled or disabled. |
functionLib.threadBarItemCount |
Gets the number of objects of a given type that are present in the current context. |
|
Gets the |
|
Clicks on any span with repository name in the List or Form Applet. |
|
Gets the |
|
Gets the specified attribute ( |
functionLib.toolbarItemIsEnabled |
Detects whether a particular toolbar item is enabled on the target HTML element defined by the path. |
functionLib.viewAppletActiveApplet |
Gets the |
|
Gets the |
functionLib.viewAppletGetRepositoryName |
Gets the specified attribute ( |
functionLib.viewAppletGetUiName |
Gets the |
|
Detects whether the specified viewApplet object exists or not. |
|
Gets the specified attribute (Applet repository name) of the target HTML element defined by the path. |
|
Gets the number of view objects present in the current context for Second level view bar. |
|
Gets the specified attribute ( |
functionLib.viewRepositoryName |
Gets the |
|
Gets the specified attribute (UI Name) of the target HTML element defined by the path. |
functionLib.visibilityFilterActiveItem |
Gets the currently active visibility filter item name in the List Applet. |
|
Waits until the Document Object Model (DOM) of the page gets loaded. |
functionLib.webListGetItemByIndex |
Gets the specified attribute ( |
|
Gets the |
functionLib.webListSelectItemByIndex |
Selects the specified Item in a web list for the given Xpath and index of the target HTML element. |
functionLib.webListSelectItemByValue |
Selects the item in a web list for the specified Xpath and Value of the target HTML element. |
The following sections provide detailed reference information for each method and enum in the Siebel Function Library Class of Siebel Function Library Application Programming Interface.
Activates a row in the list.
Format
The functionLib.activateRow method has the following command format(s):
functionLib.activateRow(xpath, row);
Gets the specified attribute (RepositoryName
) of the activeScreen of the target HTML element defined by the path.
Format
The functionLib.activeScreen method has the following command format(s):
functionLib.activeScreen( );
Gets the specified attribute (RepositoryName
) of the active view of the target HTML element defined by the path.
Format
The functionLib.activeView method has the following command format(s):
functionLib.activeView( );
Gets the property
attribute of the target HTML element defined by the path.
Format
The functionLib.advancededitGetRoProperty method has the following command format(s):
functionLib.advancededitGetRoProperty(propertyName, xpath);
Command Parameters
a String specifying the property (for example, classname
, rn
, un
, value
) to get.
a String specifying the object path.
Example
Gets the value of the advancededit element with the attribute value
and prints the custom message.
//Using Java variable.
String value = functionLib.advancededitGetRoProperty("value","/web:window[]" +
"/web:document[]" +
"/web:form[]" +
"/web:input_text[@rn='Revenue' and @ot='JCurrencyCalc' " +
"and @un='Revenue']");
System.out.println("AdvancedEdit value is "+value);
Gets the specified attribute (un
, rn
, exist
) of the target HTML element defined by the path.
Format
The functionLib.appletGetROProperty method has the following command format(s):
functionLib.appletGetROProperty(propertyName);
Command Parameters
a String specifying the property (For example, un
, rn
, exist
) to get.
Example
Gets the repository name (rn
) of the Applet object and prints the custom message if matches the expected value.
//Using Java variable.
String repName = functionLib.appletGetROProperty("rn");
if(repName.equals("Visible Contact List View"))
{
System.out.println("Pass");
}
else
{
System.out.println("Fail");
}
Performs click action on the Application Menu Links.
Format
The functionLib.ApplicationMenuClick method has the following command format(s):
functionLib.ApplicationMenuClick(unLIAppMenuItem, unLIAppSubmenuItem);
Gets the specfied attribute (text
, un
, rn
, classname
, isenabled
) of the target HTML element defined by the path.
Format
The functionLib.buttonGetRoProperty method has the following command format(s):
functionLib.buttonGetRoProperty(xpath, propertyName);
Command Parameters
a String specifying the object xpath.
a String specifying the property (For example, text
, un
, rn
, classname
, isenabled
) to get.
Example
Gets the value of the button element with the attribute text
and prints the custom message.
//Using Java variable.
String getAttribute = functionLib.buttonGetRoProperty("/web:window" +
"/web:document" +
"/web:form" +
"/web:button[@rn='NewRecord' and @ot='Button' and @un='New']", "text");
//Using If condition comparing with expected.
if (getAttribute.equals("New"))
{
System.out.println("Pass");
}
else
{
System.out.println("Fail");
}
Gets the disabled
attribute of the target HTML element defined by the xpath.
Format
The functionLib.buttonIsEnabled method has the following command format(s):
functionLib.buttonIsEnabled(xpath);
Example
Detect whether or not the button is enabled and prints the custom message if enable/disabled.
//Using Java variable.
boolean enabled = functionLib.buttonIsEnabled("/web:window" +
"/web:document" +
"/web:form" +
"/web:button[@rn='NewRecord' and @ot='Button' and @un='New']");
if(enabled)
{
System.out.println("button is enabled");
}
else
System.out.println("button is not enabled");
Gets the rn
attribute of the target HTML element defined by the xpath.
Format
The functionLib.buttonRepositoryName method has the following command format(s):
functionLib.buttonRepositoryName(xpath);
Example
Gets the rn
attribute of the target xpath and prints the custom message.
//Using Java variable.
String repoName = functionLib.buttonRepositoryName("/web:window" +
"/web:document" +
"/web:form" +
"/web:button[@rn='NewRecord' and @ot='Button' and @un='New']");
if(repoName.equals("New"))
{
System.out.println("Pass");
}
else
{
System.out.println("Fail");
}
Gets the un
attribute of the target HTML element defined by the xpath.
Format
The functionLib.buttonUIName method has the following command format(s):
functionLib.buttonUIName(xpath);
Example
Gets the attribute un
for the element button and prints the custom message.
//Using Java variable.
String UIName = functionLib.buttonUIName("/web:window" +
"/web:document" +
"/web:form" +
"/web:button[@rn='NewRecord' and @ot='Button' and @un='New']");
if(UIName.equals("New"))
{
System.out.println("Pass");
}
else
{
System.out.println("Fail");
}
Gets the specified attribute (ClassName
) of the target HTML element defined by the path.
This Function is common for both List and Form Applets.
Format
The functionLib.calculatorClassName method has the following command format(s):
functionLib.calculatorClassName(xpath);
Example
Gets the classname of the calculator object element and prints the custom message.
//Using Java variable.
String value = functionLib.calculatorClassName("/web:window" +
"/web:document" +
"/web:form[@name='SWEForm1_0' ]" +
"/web:input_text[@rn='Current Volume' and @ot='JCurrencyCalc' " +
"and @un='Current Volume']");
System.out.println("Calculator classname is"+value);
Gets the specfied attribute (propertyname
) of the target HTML element defined by the path.
This function should be used only for List Applet objects.
Format
The functionLib.calculatorGetROProperty method has the following command format(s):
functionLib.calculatorGetROProperty(xpath, propertyname);
functionLib.calculatorGetROProperty(xpath, propertyname, row);
Command Parameters
a String specifying the object path.
the property name to get.
an Integer specifying the row number from the List Applet (should always start from one).
Example
Gets the value of the calculator element with the attribute value
and prints the custom message if matches the required value.
//Using Java variable.
String getAttribute2 = functionLib.calculatorGetROProperty("/web:window" +
"/web:document" +
"/web:div[@rn='NRC Total' and @ot='JCurrencyCalc' " +
"and @un='NRC Total']", "value", 2 );
if(getAttribute2.equals(""))
{
System.out.println("Pass");
}
else
{
System.out.println("Fail");
}
Detects whether the calculator object is enabled or disabled.
This function should be used only for Form Applets.
Format
The functionLib.calculatorIsEnabled method has the following command format(s):
functionLib.calculatorIsEnabled(xpath);
functionLib.calculatorIsEnabled(xpath, row);
Command Parameters
a String specifying the object path should be taken from the specified column header from the List Applet..
an Integer specifying the row number from the List Applet (should always start from one).
Example
Detects whether the calculator object is enabled or disabled and prints a custom message based on whether calculator object is enabled or disabled.
//Using Java variable.
boolean cal = functionLib.calculatorIsEnabled("/web:window" +
"/web:document" +
"/web:div[@rn='NRC Total' and @ot='JCurrencyCalc' " +
"and @un='NRC Total']",5);
if(cal)
{
System.out.println("Enabled");
}
else
{
System.out.println("Disabled");
}
Detects whether the specified calculator popup is open or closed.
Format
The functionLib.calculatorIsOpen method has the following command format(s):
functionLib.calculatorIsOpen(xpath);
Example
Detect whether the calculator popup is open or closed and prints a custom message.
//Using Java variable.
String value = functionLib.calculatorIsOpen("/web:window[]" +
"/web:document[]" +
"/web:input_text[@id='s_0_1_313_0']");
if(value.equals("true"))
{
System.out.println("calculator popup is Opened");
}
else
{
System.out.println("calculator popup is Closed");
}
Gets the specified attribute (RepositoryName
) of the target HTML element defined by the path.
This Function is common for both List and Form Applets.
Format
The functionLib.calculatorRepositoryName method has the following command format(s):
functionLib.calculatorRepositoryName(xpath);
Example
Gets the RepositoryName
attribute of the calculator object element and prints the custom message.
//Using Java variable.
String value = functionLib.calculatorRepositoryName("/web:window[]" +
"/web:document[]" +
"/web:form[@name='SWEForm1_0' ]" +
"/web:input_text[@rn='Current Volume' and @ot='JCurrencyCalc' " +
"and @un='Current Volume']");
System.out.println("Calculator RepositoryName is "+value);
Gets the text
value of the target HTML element defined by the xpath.
This Function should be used only for List Applets.
Format
The functionLib.calculatorText method has the following command format(s):
functionLib.calculatorText(xpath);
functionLib.calculatorText(xpath, row);
Command Parameters
a String specifying the object path.
an Integer value specifying the row number from the List Applet (should always start from one).
Example
Gets the text
value from the object for the second row of the List Applet and prints the custom message.
//Using Java variable.
String value = functionLib.calculatorText("/web:window" +
"/web:document" +
"/web:div[@rn='NRC Total' and @ot='JCurrencyCalc' " +
"and @un='NRC Total']", 2);
if(value.equals("$1,222.00"))
{
System.out.println("Pass");
}
else
{
System.out.println("Fail");
}
Gets the specified attribute (UiName
) of the target HTML element defined by the path.
This Function will be common for both List and Form Applets.
Format
The functionLib.calculatorUiName method has the following command format(s):
functionLib.calculatorUiName(xpath);
Example
Gets the UiName of the calculator object element and prints the custom message.
//Using Java variable.
String value = functionLib.calculatorUiName("/web:window" +
"/web:form[@name='SWEForm1_0']" +
"/web:input_text[@rn='NetTotal' and @ot='JCalculator' " +
"and @un='Quote Total']");
System.out.println("Calculator UiName is "+value);
Gets the day value of the calendar object in the Form Applet.
Format
The functionLib.calendarDay method has the following command format(s):
functionLib.calendarDay(xpath);
functionLib.calendarDay(xpath, row);
Command Parameters
a String specifying the object path should be taken from the specified column header of the List Applet..
an Integer specifying the row number from the List Applet (should always start from one).
Example
Gets the day of the calendar object for the List Applet and prints the custom message.
//Using Java variable.
String day = functionLib.calendarDay("/web:window" +
"/web:document" +
"/web:div[@rn='Start Date' and @ot='JDatePick' " +
"and @un='Effective As Of']", 5);
System.out.println("Day is "+day);
Clicks on the day link in the Calender object/popup in Form Applets.
The Calendar popup should be open before clicking on any day.
Format
The functionLib.calendarDayClick method has the following command format(s):
functionLib.calendarDayClick(xpath, day);
functionLib.calendarDayClick(xpath, row, day);
Command Parameters
a String specifying the object path should be taken from the specified column header of the List Applet.
an integer specifying the row number from the List Applet (should always start from one).
String specifying a day to click on the calendar popup.
Example
Clicks a day on the calendar popup in the List Applet.
//Using Java variable.
String ispopup = functionLib.isCalendarPopup();
if(ispopup.equals("true"))
{
System.out.println("calendar is popup");
functionLib.calendarDayClick("/web:window" +
"/web:document" +
"/web:div[(@rn='Primary Revenue Close Date' " +
"and @ot='JDatePick') or @un='Close Date']", 1, "12");
}
else
{
System.out.println("calendar is not popup");
}
Gets the calendar day value in the List Applet.
Format
The functionLib.calendarDayListApplet method has the following command format(s):
functionLib.calendarDayListApplet(xpath, row);
Detects whether the specified calendar popup is open or closed.
Format
The functionLib.calendarIsOpen method has the following command format(s):
functionLib.calendarIsOpen(xpath);
Example
Detect whether calendar popup is open or closed and prints a custom message.
//Using Java variable.
String value = functionLib.calendarIsOpen("/web:window[]" +
"/web:document[]" +
"/web:input_text[@id='s_0_1_313_0']");
if(value.equals("true"))
{
System.out.println("calendar popup is Opened");
}
else
{
System.out.println("calendar popup is Closed");
}
Gets the month of the calendar object for the Form Applet.
Format
The functionLib.calendarMonth method has the following command format(s):
functionLib.calendarMonth(xpath);
functionLib.calendarMonth(xpath, row);
Command Parameters
a String specifying the object path should be taken from the specified column header from the List Applet.
an Integer specifying the row number from the List Applet (should always start from one).
Example
Gets the month of the calendar object for the List Applet and prints the custom message.
//Using Java variable.
String month = functionLib.calendarMonth("/web:window" +
"/web:document" +
"/web:div[@rn='Start Date' and @ot='JDatePick' " +
"and @un='Effective As Of']", 5);
System.out.println("Month is "+month);
Gets the calendar month value in the List Applet.
Format
The functionLib.calendarMonthListApplet method has the following command format(s):
functionLib.calendarMonthListApplet(xpath, row);
Gets the year value of the Calendar object in the Form Applet.
Format
The functionLib.calendarYear method has the following command format(s):
functionLib.calendarYear(xpath);
functionLib.calendarYear(xpath, row);
Command Parameters
a String specifying the object path should be taken from the specified column header of the List Applet..
an Integer specifying the row number from the List Applet (should always start from one).
Example
Gets the year of the calendar object for the fifth row in the List Applet and prints the custom message.
//Using Java variable.
String year = functionLib.calendarYear("/web:window" +
"/web:document" +
"/web:div[@rn='Start Date' and @ot='JDatePick' " +
"and @un='Effective As Of']", 5);
System.out.println("year is "+year);
Gets the calendar year value in the List Applet.
Format
The functionLib.calendarYearListApplet method has the following command format(s):
functionLib.calendarYearListApplet(xpath, row);
Gets the classname
attribute of the target HTML element defined by the path.
Format
The functionLib.calenderClassName method has the following command format(s):
functionLib.calenderClassName(xpath);
Example
Gets the classname
attribute of the calendar object and prints the custom message.
//Using Java variable.
String classname = functionLib.calenderClassName("/web:window" +
"/web:document" +
"/web:input_text[@rn='CloseDate2' and @ot='JDatePick' " +
"and @un='Close Date']");
System.out.println("calendar classname is "+classname);
Gets the specfied attribute (rn
, un
, classname
, value
) of the target HTML element defined by the path.
This function should be used only for Form Applet objects.
Format
The functionLib.calenderGetROProperty method has the following command format(s):
functionLib.calenderGetROProperty(xpath, propertyname);
functionLib.calenderGetROProperty(xpath, propertyname, row);
Command Parameters
a String specifying the object path should be taken from the specified column header from the List Applet.
a String specifying the property (for example, rn
, un
, classname
, value
) to get.
an Integer specifying the row number from the List Applet (should always start from one).
Example
Gets the value of the calender element with the attribute value
and prints the custom message if matches the required value.
//Using Java variable.
String getAttribute = functionLib.calenderGetROProperty("/web:window" +
"/web:document" +
"/web:div[@rn='Primary Revenue Close Date' " +
"and @ot='JDatePick' and @un='Close Date']", "value", 2 );
if(getAttribute.equals("9/7/2013"))
{
System.out.println("Pass");
}
else
{
System.out.println("Fail");
}
Detects whether the calendar object is enabled or disabled.
This function should be used only for List Applets.
Format
The functionLib.calenderIsEnabled method has the following command format(s):
functionLib.calenderIsEnabled(xpath);
functionLib.calenderIsEnabled(xpath, row);
Command Parameters
a String specifying the object path.
an Integer specifying the row number from the List Applet (should always start from one).
Example
Detects whether the calendar object is enabled or disabled and prints a custom message.
//Using Java variable.
boolean pklst2 = functionLib.calenderIsEnabled("/web:window" +
"/web:document" +
"/web:input_text[@rn='CloseDate2' and @ot='JDatePick' " +
"and @un='Close Date']", 5);
if(pklst2)
{
System.out.println("Enabled");
}
else
{
System.out.println("Disabled");
}
Gets the rn
attribute of the target HTML element defined by the xpath.
This Function should be used for both List and Form Applets.
Format
The functionLib.calenderUiName method has the following command format(s):
functionLib.calenderUiName(xpath);
Example
Gets the repository name of the calendar object and prints the custom message.
//Using Java variable.
String value = functionLib.calenderUiName("/web:window" +
"/web:document" +
"/web:input_text[@rn='CloseDate2' and @ot='JDatePick' " +
"and @un='Close Date']");
System.out.println("calendar UI name is "+value);
Gets the class
attribute of the target HTML element defined by the xpath.
Common for both Form and List Applet objects.
Format
The functionLib.checkBoxClassName method has the following command format(s):
functionLib.checkBoxClassName(xpath);
Example
Gets the class
attribute of the currency object and prints the custom message.
//Using Java variable.
String chkbox = functionLib.checkBoxClassName("/web:window" +
"/web:document" +
"/web:form[@name='SWEForm1_0']" +
"/web:input_checkbox[@rn='Active' and @ot='JCheckBox' " +
"and @un='Active']");
System.out.println("Check box class name "+ chkbox);
Gets the specified attribute(isChecked
, isEnabled
, un
, rn
) of the target HTML element defined by the path.
This function should be used only for List Applets.
Format
The functionLib.checkboxGetROProperty method has the following command format(s):
functionLib.checkboxGetROProperty(xpath, propertyName);
functionLib.checkboxGetROProperty(xpath, propertyName, row);
Command Parameters
a String specifying the object path.
an Integer specifying the row number from the List Applet (should always start from one).
Example
Gets the UI Name of the checkbox element with the attribute un
and prints the custom message if matches the required value.
//Using Java variable.
String getAttribute = functionLib.checkboxGetROProperty("/web:window" +
"/web:document" +
"/web:input_checkbox[@rn='Secure2' and @ot='JCheckBox' " +
"and @un='Secure']", "un", 2);
if(getAttribute.equals("Secure"))
{
System.out.println("Pass");
}
else
{
System.out.println("Fail");
}
Gets the rn attribute of the target HTML element defined by the xpath.
Common for both Form and List Applet objects.
Format
The functionLib.checkboxRepositoryName method has the following command format(s):
functionLib.checkboxRepositoryName(xpath);
Example
Gets the repository name of the checkbox object and prints the custom message.
//Using Java variable.
String chkbox = functionLib.checkboxRepositoryName("/web:window" +
"/web:document" +
"/web:form[@name='SWEForm1_0']" +
"/web:input_checkbox[@rn='Active' and @ot='JCheckBox' " +
"and @un='Active']");
System.out.println("Check box Repository name "+ chkbox);
Gets the un
attribute of the target HTML element defined by the xpath.
Common for both Form and List Applet objects.
Format
The functionLib.checkBoxUIName method has the following command format(s):
functionLib.checkBoxUIName(xpath);
Example
Gets the UiName of the currency object and prints the custom message.
//Using Java variable.
String chkbox = functionLib.checkBoxUIName("/web:window" +
"/web:document" +
"/web:form[@name='SWEForm1_0']" +
"/web:input_checkbox[@rn='Active' and @ot='JCheckBox' " +
"and @un='Active']");
System.out.println("Check box UI Name"+ chkbox);
Clicks the Done button in the Calender popup in List or Form Applets.
The Calendar popup should be open before clicking the Done button.
Format
The functionLib.clickDone method has the following command format(s):
functionLib.clickDone( );
Example
Clicks the Done button in the calendar popup when the calendar is opened in List or Form Applets.
//Using Java variable.
String isCalOpen = functionLib.isCalendarPopup();
if(isCalOpen.equals("true"))
{
System.out.println("calendar is popup");
functionLib.clickDone();
}
else
{
System.out.println("calendar is not popup");
}
Clicks the Now button in the Calender popup in List or Form Applets.
The Calendar popup should be open before clicking the Now button.
Format
The functionLib.clickNow method has the following command format(s):
functionLib.clickNow( );
Example
Clicks the Now button in the calendar popup when the calendar is opened in List or Form Applets.
//Using Java variable.
String isCalOpen = functionLib.isCalendarPopup();
if(isCalOpen.equals("true"))
{
System.out.println("calendar is popup");
functionLib.clickNow();
}
else
{
System.out.println("calendar is not popup");
}
Gets the number of currently visible columns in the list (determined by show more/less).
Format
The functionLib.columnCount method has the following command format(s):
functionLib.columnCount(xpath);
Command Parameters
a String specifying the object path should be taken from the any column header from the List Applet.
Example
Gets the columns count of the List Applet and prints the custom message.
//Using Java variable.
int col = functionLib.columnCount("/web:window" +
"/web:document" +
"/web:div[@rn='Account' and @ot='JText' " +
"and @un='Account']");
for(int i = 1; i< col ; i++)
{
System.out.println("column number "+ i );
}
Gets the class
attribute of the communication toolbar object from the target HTML element defined by the xpath.
Format
The functionLib.commToolbarClassname method has the following command format(s):
functionLib.commToolbarClassname(xpath);
Example
Gets the class attribute from the HTML DOM and prints the custom message.
//Using Java variable.
String value = functionLib.commToolbarClassname("/web:window" +
"/web:document" +
"/web:img[@rn='Release Work' and @ot='button' " +
"and @un='Release_Work']");
if(value.equals("Release Work"))
{
System.out.println("Pass");
}
else
{
System.out.println("Fail");
}
Gets the property
attribute of the target HTML element defined by the path.
Format
The functionLib.commToolbarGetRoProperty method has the following command format(s):
functionLib.commToolbarGetRoProperty(xpath, value);
Command Parameters
a String specifying the object path.
a String specifying the value to check in the CommunicationsToolbar list (rn
, un
, name
and classname
).
Example
Gets the UI name of the CommunicationsToolbar with the attribute un
and prints the custom message.
//Using Java variable.
String value = functionLib.commToolbarGetRoProperty("/web:window[]" +
"/web:document[]" +
"/web:img[@rn='SignOn' and @ot='button' " +
"and @un='SignOn']", "SignOn");
System.out.println("CommunicationsToolbar repository name is "+value);
Detects whether or not the communication toolbar object is enabled from the target HTML element defined by the xpath.
Format
The functionLib.commToolbarIsEnabled method has the following command format(s):
functionLib.commToolbarIsEnabled(xpath);
Example
Gets the "aria-disabled" attribute from the HTML DOM and prints the custom message.
//Using Java variable.
boolean chkEnble = functionLib.commToolbarIsEnabled("/web:window" +
"/web:document" +
"/web:img[@rn='Release Work' and @ot='button' " +
"and @un='Release_Work']");
if(chkEnble)
{
System.out.println("Pass");
}
else
{
System.out.println("Fail");
}
Gets the rn
attribute of the communication toolbar object from the target HTML element defined by the xpath.
Format
The functionLib.commToolbarRepositoryname method has the following command format(s):
functionLib.commToolbarRepositoryname(xpath);
Example
Gets the rn
attribute from the HTML DOM and prints the custom message.
//Using Java variable.
String value = functionLib.commToolbarRepositoryname("/web:window" +
"/web:document" +
"/web:img[@rn='Release Work' and @ot='button' " +
"and @un='Release_Work']");
if(value.equals("Release Work"))
{
System.out.println("Pass");
}
else
{
System.out.println("Fail");
}
Gets the alt
attribute (ToolTip) of the target HTML element defined by the xpath.
Format
The functionLib.commToolbarShowButtonToolTip method has the following command format(s):
functionLib.commToolbarShowButtonToolTip(xpath);
Example
Gets the alt
attribute of the toolbar object and prints the custom message.
//Using Java variable.
String value = functionLib.getPageTabRepositoryName("/web:window" +
"/web:document" +
"/web:img[@rn='Release Work' and @ot='button' " +
"and @un='Release_Work']");
System.out.println("Alt tag value is "+value);
Gets the text
value attribute of the communication toolbar object from the target HTML element defined by the xpath.
Format
The functionLib.commToolbarText method has the following command format(s):
functionLib.commToolbarText(xpath);
Example
Gets the text value from the HTML DOM and prints the custom message.
//Using Java variable.
String value = functionLib.commToolbarText("/web:window" +
"/web:document" +
"/web:img[@rn='Release Work' and @ot='button' " +
"and @un='Release_Work']");
if(value.equals("Release Work"))
{
System.out.println("Pass");
}
else
{
System.out.println("Fail");
}
Gets the un
attribute of the communication toolbar object from the target HTML element defined by the xpath.
Format
The functionLib.commToolbarUiName method has the following command format(s):
functionLib.commToolbarUiName(xpath);
Example
Gets the un
attribute from the HTML DOM and prints the custom message.
//Using Java variable.
String value = functionLib.commToolbarUiName("/web:window" +
"/web:document" +
"/web:img[@rn='Release Work' and @ot='button' " +
"and @un='Release_Work']");
if(value.equals("Release Work"))
{
System.out.println("Pass");
}
else
{
System.out.println("Fail");
}
Gets the Amount
attribute of the target HTML element defined by the path.
Format
The functionLib.currencyAmount method has the following command format(s):
functionLib.currencyAmount(xpath);
functionLib.currencyAmount(xpath, rowid);
Gets the class
attribute of the target HTML element defined by the xpath.
Common for both Form and List Applet.
Format
The functionLib.currencyClassName method has the following command format(s):
functionLib.currencyClassName(xpath);
Example
Gets the repository name of the currency object and prints the custom message.
//Using Java variable.
String classname = functionLib.currencyClassName("/web:window" +
"/web:document" +
"/web:form[@name='SWEForm1_0']" +
"/web:input_text[@rn='NetTotal' and @ot='JCalculator' " +
"and @un='Quote Total']");
System.out.println("Class name is "+classname);
Returns the Currency Code value of the currency field in the List Applet.
Format
The functionLib.currencyCode method has the following command format(s):
functionLib.currencyCode(xpath);
functionLib.currencyCode(xpath, rowid);
Command Parameters
a String specifying the object path should be taken from the specified column header from the List Applet.
an Integer specifying the row id of the record in the List Applet for which the Currency Code value is to be retrieved.
Example
Returns the Currency Code value of the currency field.
//Using Java variable.
String curvalue = functionLib.currencyCode("/web:window" +
"/web:document" +
"/web:form[@name='SWEForm1_0' or @index='2']" +
"/web:input_text[@rn='Sub-Status' and @ot='JComboBox' " +
"and @un='Sub Status']", 2);
System.out.println("Currency code value is "+curvalue);
Gets the specified attribute (rn
, un
, classname
, value
) of the target HTML element defined by the path.
This function should be used only for List Applets.
Format
The functionLib.currencyGetROProperty method has the following command format(s):
functionLib.currencyGetROProperty(xpath, propertyname);
functionLib.currencyGetROProperty(xpath, propertyname, row);
Command Parameters
a String specifying the object path.
a String specifying the property (for example,: rn
, un
, classname
, value
) to get.
an Integer specifying the row number from the List Applet (should always start from one).
Example
Gets the value of the currency element with the attribute value
and prints the custom message if it matches the required value.
//Using Java variable.
String getAttribute = functionLib.currencyGetROProperty("/web:window" +
"/web:document" +
"/web:input_text[@rn='Revenue2' and @ot='JCurrencyCalc' " +
"and @un='Revenue']", "value", 2);
if(getAttribute.equals("$100.00"))
{
System.out.println("Pass");
}
else
{
System.out.println("Fail");
}
Detects whether the currency object is enabled or disabled.
This function should be used only for List Applets.
Format
The functionLib.currencyIsEnabled method has the following command format(s):
functionLib.currencyIsEnabled(xpath);
functionLib.currencyIsEnabled(xpath, row);
Command Parameters
a String specifying the object path.
an Integer specifying the row number from the List Applet (should always start from one).
Example
Detects whether the currency object is enabled or disabled and prints a custom message based on whether currency object is enabled or disabled.
//Using Java variable.
boolean currency = functionLib.currencyIsEnabled("/web:window" +
"/web:document" +
"/web:form[@name='SWEForm1_0']" +
"/web:input_text[@rn='NetTotal' and @ot='JCalculator' " +
"and @un='Quote Total']", 5);
if(currency)
{
System.out.println("Pass");
}
else
{
System.out.println("Fail");
}
Detects whether the specified Currency popup is open or closed.
Format
The functionLib.currencyIsOpen method has the following command format(s):
functionLib.currencyIsOpen(xpath);
Example
Detect whether Currency popup is open or closed and prints a custom message.
//Using Java variable.
boolean value33 = functionLib.currencyIsOpen("/web:window[]" +
"/web:document[]" +
"/web:input_text[@id='s_0_1_313_0']");
if(value33)
{
System.out.println("Currency popup is Opened");
}
else
{
System.out.println("Currency popup is Closed");
}
Gets the rn
attribute of the target HTML element defined by the xpath.
Common for both Form and List Applet objects.
Format
The functionLib.currencyRepositoryName method has the following command format(s):
functionLib.currencyRepositoryName(xpath);
Example
Gets the rn attribute of the currency object and prints the custom message.
//Using Java variable.
String currencyRN = functionLib.currencyRepositoryName("/web:window" +
"/web:document" +
"/web:form[@name='SWEForm1_0']" +
"/web:input_text[@rn='NetTotal' and @ot='JCalculator' " +
"and @un='Quote Total']");
System.out.println("currency Repository Name is "+currencyRN);
Gets the text value of the target HTML element defined by the xpath.
This Function should be used only for List Applets.
Format
The functionLib.CurrencyText method has the following command format(s):
functionLib.CurrencyText(xpath);
functionLib.CurrencyText(xpath, row);
Command Parameters
a String specifying the object path.
an Integer value specifying the row number from the List Applet (should always start from one).
Example
Gets the text value from the object for the second row of the List Applet and prints the custom message.
//Using Java variable.
String value = functionLib.CurrencyText("/web:window" +
"/web:document" +
"/web:div[@rn='Primary Revenue Amount' and @ot='JCurrencyCalc' " +
"and @un='Revenue']", 2);
if(value.equals("$1,222.00"))
{
System.out.println("Pass");
}
else
{
System.out.println("Fail");
}
Gets the un
attribute of the target HTML element defined by the xpath.
Common for both Form and List Applet objects.
Format
The functionLib.currencyUiName method has the following command format(s):
functionLib.currencyUiName(xpath);
Example
Gets the un
attribute of the currency object and prints the custom message.
//Using Java variable.
String currencyUN = functionLib.currencyUiName("/web:window" +
"/web:document" +
"/web:form[@name='SWEForm1_0']" +
"/web:input_text[@rn='NetTotal' and @ot='JCalculator' " +
"and @un='Quote Total']");
System.out.println("currency UIName is "+currencyUN);
Gets the level at which the Current row exists in the Hierarchial List Applet.
DataLevel=0
indicates the Parent level. DataLevel=1
indicates the first child level.
Format
The functionLib.DataLevel method has the following command format(s):
functionLib.DataLevel(xpath, row);
Command Parameters
a String specifying the object path. Should be taken from the specified column header from the List Applet.
an integer specifying the row number from the List Applet (should always start from one).
Example
Gets the level at which the Current row exists in the Hierarchial List Applet and prints a custom messaage.
//Using Java variable.
String datalevel = functionLib.DataLevel("/web:window" +
"/web:document" +
"/web:div[(@rn='Name' and @ot='JText') " +
"or @un='Name']", 3);
System.out.println("data level is " + datalevel);
Gets the parent ID of the Specified row in the Hierarchial List Applet.
The attribute data-parentid=1
indicates the specified row's parent is one level above. data-parentid=-1
indicates it is at the parent level.
Format
The functionLib.DataParentId method has the following command format(s):
functionLib.DataParentId(xpath, row);
Command Parameters
a String specifying the object path. Should be taken from the specified column header from the List Applet.
an integer specifying the row number from the List Applet (should always start from one).
Example
Gets the parent ID of the Specified row and prints a custom message.
//Using Java variable.
String dataParentId = functionLib.DataParentId("/web:window" +
"/web:document" +
"/web:div[(@rn='Name' and @ot='JText') " +
"or @un='Name']", 3);
System.out.println("data parent ID is " + dataParentId);
Gets the specified attribute (property
) of the target HTML element defined by the path.
Format
The functionLib.dialogGetROProperty method has the following command format(s):
functionLib.dialogGetROProperty(xpath);
Example
Gets the current value of the test object property from the object in the application and prints the custom message.
//Using Java variable.
String value = functionLib.dialogGetROProperty("/web:dialog_confirm[]" +
"/web:accDialog[@name='Message from webpage']");
System.out.println("Dialog Property is "+value);
Drill down the specified object row of the List Applet.
Format
The functionLib.Drilldown method has the following command format(s):
functionLib.Drilldown(xpath, row);
Extracts and returns the ID attribute value of the given Xpath.
Format
The functionLib.extractId method has the following command format(s):
functionLib.extractId(xpath, x, y, rowid);
Generate the ID from the given row.
Format
The functionLib.generateID method has the following command format(s):
functionLib.generateID(xpath, row);
Command Parameters
a String specifying the object path should be taken from the specified column header from the List Applet.
an Integer specifying the row number.
Example
Generate the ID from the given row.
//Using Java variable.
String idvalue = functionLib.generateID("/web:window" +
"/web:document" +
"/web:form[@name='SWEForm1_0' or @index='2']" +
"/web:input_text[@rn='Sub-Status' and @ot='JComboBox' " +
"and @un='Sub Status']", 2);
System.out.println("ID value is "+idvalue);
Gets the text for a specified cell when the cell has same repository name across multipal applets in same screen..
Format
The functionLib.getCellData method has the following command format(s):
functionLib.getCellData(xpath, row);
functionLib.getCellData(xpath, row, AppletRepName);
Command Parameters
a String specifying the object path should be taken from the specified column header from the List Applet.
an Integer specifying the row number from the List Applet (should always start from one).
a string specifying the repository name of the Applet().
Example
Gets the rows count of the List Applet, loops, and prints the custom message for all the rows.
//Using Java variable.
int rows = functionLib.rowCount("/web:window" +
"/web:document" +
"/web:div[@rn='PenaltyAmount' " +
"and @ot='JCurrencyCalc']");
for(int i = 1; i< rows ; i++)
{
System.out.println(functionLib.getCellData("/web:window" +
"/web:document" +
"/web:div[@rn='PenaltyAmount' " +
"and @ot='JCurrencyCalc']", i ,"ISS Promotion Upgrade To List Applet"));
}
Gets the equivalent month for the corresponding number.
Format
The functionLib.getNumberMonth method has the following command format(s):
functionLib.getNumberMonth(val);
Command Parameters
an integer that specifies the number for that month (should always start from zero). For example. 0, 1 ,2.
Gets the rn
attribute of the target HTML element defined by the xpath.
Inspect element on the tab and input the same to the function.
Format
The functionLib.getPageTabRepositoryName method has the following command format(s):
functionLib.getPageTabRepositoryName(xpath);
Example
Gets the repository name of the pagetab object and prints the custom message.
//Using Java variable.
String pagerp = functionLib.getPageTabRepositoryName("/web:window" +
"/web:document" +
"/web:a[@text='Accounts']");
if(pagerp.equals("Accounts"))
{
System.out.println("Pass");
}
else
{
System.out.println("Fail");
}
Gets the rn
attribute of the target HTML element defined by the xpath using index.
Inspect path on the tab and input the same to the function.
Format
The functionLib.getPageTabRepositoryNameByIndex method has the following command format(s):
functionLib.getPageTabRepositoryNameByIndex(xpath, index);
The GetROPropertyImage enum has the following values:
Table 21-8 List of GetROPropertyImage Values
Value | Description |
---|---|
classname |
The ROPropertyImage |
isenabled |
The ROPropertyImage |
repositoryname |
The ROPropertyImage |
text |
The ROPropertyImage |
uiname |
The ROPropertyImage |
The GetROPropertyLink enum has the following values:
Table 21-9 List of GetROPropertyLink Values
Value | Description |
---|---|
classname |
The ROPropertyLink |
isenabled |
The ROPropertyLink |
repositoryname |
The ROPropertyLink |
text |
The ROPropertyLink |
uiname |
The ROPropertyLink |
Collapses the specified row in the Hierarchial List Applet.
Format
The functionLib.Hcollapse method has the following command format(s):
functionLib.Hcollapse(xpath, row);
Expands the specified row in the Hierarchial List Applet.
Format
The functionLib.Hexpand method has the following command format(s):
functionLib.Hexpand(xpath, row);
Gets the color of the icon in the List Applet.
Format
The functionLib.iconColor method has the following command format(s):
functionLib.iconColor(xpath, row);
Gets the property
attribute of the target HTML element defined by the path.
Format
The functionLib.imageGetRoProperty method has the following command format(s):
functionLib.imageGetRoProperty(propertyName, xpath);
Detects whether or not the specified checkbox object is checked for the List Applet.
Format
The functionLib.isCheckboxChecked method has the following command format(s):
functionLib.isCheckboxChecked(xpath);
functionLib.isCheckboxChecked(xpath, row);
Command Parameters
a String specifying the object xpath.
an Integer specifying the row number for the List Applet (should always starts from one) .
Example
Detects whether the checkbox object is checked or unchecked and prints a custom message based on whether the checkbox object is checked or unchecked.
//Using Java variable.
boolean chkbox = functionLib.isCheckboxChecked("/web:window" +
"/web:document" +
"/web:div[@rn='Row Status' and @ot='JCheckBox' and @un='New']", 1);
if(chkbox)
{
System.out.println("Checked");
}
else
{
System.out.println("Unchecked");
}
Detects whether the specified checkbox object is enabled or disabled for the List Applet.
Format
The functionLib.isCheckboxEnabled method has the following command format(s):
functionLib.isCheckboxEnabled(xpath);
functionLib.isCheckboxEnabled(xpath, row);
Command Parameters
a String specifying the object xpath.
an Integer specifying the row number for the List Applet (should always start from one).
Example
Detects whether checkbox object is enabled or disabled and prints a custom message based on whether the checkbox object is enabled or disabled.
//Using Java variable.
boolean chkbox = functionLib.isCheckboxEnabled("/web:window" +
"/web:document" +
"/web:div[@rn='Row Status' and @ot='JCheckBox' and @un='New'],1");
if(chkbox)
{
System.out.println("enabled");
}
else
{
System.out.println("disabled");
}
Detects wheather the specified column exist or not in the List Applet.
Format
The functionLib.isColumnExist method has the following command format(s):
functionLib.isColumnExist(AppletRepName, ColumnRepName);
Detects the the state of table column, where state is the value of the column's disabled or read-only property.
Format
The functionLib.isColumnwritable method has the following command format(s):
functionLib.isColumnwritable(xpath);
Command Parameters
a String specifying the object path should be taken from the specified column header from the List Applet.
Example
Detects the the state of table column and prints the custom message.
//Using Java variable.
boolean writable = functionLib.isColumnwritable("/web:window" +
"/web:document" +
"/web:div[@rn='First Name' and @ot='JText' " +
"and @un='First Name']");
if(writable)
{
System.out.println("Writable");
}
else
{
System.out.println("Not writable");
}
Detects if the specified row is expanded or not in the Hierarchial List Applet.
Format
The functionLib.isHierarchialListExpanded method has the following command format(s):
functionLib.isHierarchialListExpanded(xpath, row);
Command Parameters
a String specifying the object path. Should be taken from the specified column header from the List Applet.
an integer specifying the row number from the List Applet (should always start from one).
Example
Detects if the specified row is expanded or not in the Hierarchial List Applet and prints a custom message.
//Using Java variable.
String isExpanded = functionLib.isHierarchialListExpanded("/web:window" +
"/web:document" +
"/web:div[(@rn='Name' and @ot='JText') " +
"or @un='Name']", 3);
if(isExpanded.equals("true"))
{
System.out.println("Row is expanded");
}
else
{
System.out.println("Row is not expanded");
}
Detects whether or not the current Applet represents a popup Applet.
Format
The functionLib.isPopupApplet method has the following command format(s):
functionLib.isPopupApplet( );
Example
Detects whether or not the popup exists and prints the custom message if it exists or does not exist.
//Using Java variable.
Boolean exist = functionLib.isPopupApplet();
//Using If condition to compare with expected.
if (exist)
{
System.out.println("popup exists");
}
else
{
System.out.println("popup does not exist");
}
Detects whether the specified object is required or not.
(This function can be verified only on the Form Applet because asterisk mark is seen only on the form.)
Format
The functionLib.isRequired method has the following command format(s):
functionLib.isRequired(xpath);
Example
Indicates whether the object is required and prints the custom message.
//Using Java variable.
boolean value = functionLib.isRequired("/web:window[]" +
"/web:document[]" +
"/web:form[@name='SWEForm1_0']" +
"/web:input_text[@rn='Type' and @ot='JComboBox' " +
"and @un='Account Type']");
System.out.println("The object Required is "+value);
Gets the propertyname
attribute of the target HTML element defined by the path.
Format
The functionLib.linkGetRoProperty method has the following command format(s):
functionLib.linkGetRoProperty(propertyName, xpath);
Command Parameters
a String specifying the property (for example, text
, uiname
, classname
, repositoryname
, isenabled
) to get.
a String specifying the object path.
Example
Gets the text of the link element with the attribute text
and prints the custom message.
//Using Java variable.
String value = functionLib.linkGetRoProperty("text","/web:window[]" +
"/web:document[]" +
"/web:a[@text='Abu Nidal organization (ANO)']");
System.out.println("link text is "+value);
Launches the browser and logs into the Application.
Format
The functionLib.Login method has the following command format(s):
functionLib.Login(UserType, BrowserName, EnvName);
Gets the number of menu items from the Applet Level Menu object.
Inspects the path on the menu button and use the same path for the input to the function.
Format
The functionLib.menuCount method has the following command format(s):
functionLib.menuCount(xpath);
Example
Gets the number of items from the menu object and prints a custom message.
//Using Java variable.
int items = functionLib.menuCount("/web:window" +
"/web:document" +
"/web:form[@name='SWEForm1_0' or @index='1']" +
"/web:button[@id='s_at_m_1' or @index='3']");
System.out.println("Number of menu items "+items);
Detects whether or not the specified menu object or menu item is enabled.
Format
The functionLib.menuItemEnabled method has the following command format(s):
functionLib.menuItemEnabled(xpath);
Example
Detects whether checkbox object is enabled or disabled and prints a custom message.
//Using Java variable.
boolean value = functionLib.menuItemEnabled("/web:window" +
"/web:document" +
"/web:form[@name='SWEForm1_0' or @index='1']" +
"/web:button[@id='s_at_m_1' or @index='3']");
if(value)
{
System.out.println("Menu item is enabled");
}
else
{
System.out.println("Menu item is disabled");
}
Detects whether or not the specified menu object or menu item exists.
Format
The functionLib.menuItemExist method has the following command format(s):
functionLib.menuItemExist(rn);
Example
Detect whether or not the menu item object exists and prints a custom message.
//Using Java variable.
boolean menuExists = functionLib.menuItemExist("*Browser Applet* *ExecuteQuery*SIS Account List Applet* ");
if(menuExists)
{
System.out.println("Menu item exists");
}
else
{
System.out.println("Menu item does not exist");
}
Gets the rn
attribute of the target HTML element defined by the xpath.
Format
The functionLib.menuItemGetRepositoryName method has the following command format(s):
functionLib.menuItemGetRepositoryName(xpath);
Example
Gets the repository name of the menu object and prints the custom message.
//Using Java variable.
String menuRP = functionLib.menuItemGetRepositoryName("/web:window" +
"/web:document" +
"/web:form[@name='SWEForm1_0' or @index='1']" +
"/web:button[@id='s_at_m_1' or @index='3']");
System.out.println("Repository name is"+menuRP);
Gets the rn
attribute of the target HTML element defined by the xpath.
Format
The functionLib.menuItemRepositoryName method has the following command format(s):
functionLib.menuItemRepositoryName(xpath);
Example
Gets the repository name of the menu object and prints the custom message.
//Using Java variable.
String menurp = functionLib.menuItemRepositoryName("/web:window" +
"/web:document" +
"/web:form[@name='SWEForm1_0' or @index='1']" +
"/web:button[@id='s_at_m_1' or @index='3']");
System.out.println("Repository name is"+menurp);
Gets the equivalent month for the corresponding string value from the Document Object Model(DOM).
Format
The functionLib.monthMapping method has the following command format(s):
functionLib.monthMapping(vall);
Command Parameters
a String that specifies the number for that month (should always starts from zero). For example, 0, 1, 2.
Navigates to the Screen/View from SiteMap.
Format
The functionLib.Navigate_Screen method has the following command format(s):
functionLib.Navigate_Screen(RepName, L1UIName, L2VName, L2UIName);
Clicks on the element inside the specified cell.
Format
The functionLib.openCellElement method has the following command format(s):
functionLib.openCellElement(columnxpath, row);
Command Parameters
a String specifying the object path should be taken from the specified column header from the List Applet..
an Integer specifying the row number from the List Applet (should always start from one).
Example
Gets the rows count of the List Applet. Then, loop and opens the cell for all the rows.
//Using Java variable.
int rows = functionLib.rowCount("/web:window" +
"/web:document" +
"/web:div[@rn='Type' and @ot='JComboBox' " +
"and @un='Account Type']");
for(int i = 1; i< rows ; i++)
{
functionLib.openCellElement("/web:window" +
"/web:document" +
"/web:div[@rn='Type' and @ot='JComboBox' " +
"and @un='Account Type']", i );
}
Opens the pop up for the specified field in the List Applet.
Format
The functionLib.openpopup method has the following command format(s):
functionLib.openpopup(xpath);
functionLib.openpopup(xpath, row);
Detects whether or not the specified Pagetab object exists.
Format
The functionLib.pageTabIsExists method has the following command format(s):
functionLib.pageTabIsExists(Xpath, TabRepName);
Command Parameters
a String specifying the object path.
a String specifying the Repository Name of the object.
Example
Detects whether or not the Pagetab object exists and print a custom message.
//Using Java variable.
boolean value = functionLib.pageTabIsExists("/web:window[]" +
"/web:document[]" +
"/web:a[]", "Account Screen Homepage View");
if(value)
{
System.out.println("Pagetab object exists");
}
else
{
System.out.println("Pagetab object does not exist");
}
Gets the specified attribute (pageTabActiveScreen
, activeView
, screenCount
, viewCount
) of the target HTML element defined by the path.
Format
The functionLib.pagetabsGetROProperty method has the following command format(s):
functionLib.pagetabsGetROProperty(propertyName);
Gets the class name of the target HTML element defined by the path.
Format
The functionLib.pdqClassName method has the following command format(s):
functionLib.pdqClassName(xpath);
Example
Gets the class attribute of the PDQ object and prints the custom message.
//Using Java variable.
String PDQclassname = functionLib.pdqClassName("/web:window" +
"/web:document" +
"/web:form[@name='SWEForm0']" +
"/web:select[(@name='s_pdq')]");
System.out.println("PDQ classname is "+PDQclassname );
Gets the specified attribute (Property
) of the target HTML element defined by the path.
Format
The functionLib.pdqGetROProperty method has the following command format(s):
functionLib.pdqGetROProperty(xpath, propertyName);
Command Parameters
a String specifying the object path.
a String specifying the property (for example, rn
, un
, text
) to get.
Example
Gets the text value of the PDQ element with the attribute text
and prints the custom message.
//Using Java variable.
String value = functionLib.pdqGetROProperty("/web:window[]" +
"/web:document[]" +
"/web:form[]" +
"/web:select[(@name='s_pdq') " +
"and multiple mod 'False']", "text");
System.out.println("PDQ text is "+value);
Detects whether or not the specified PDQ object exists.
Format
The functionLib.pdqisExist method has the following command format(s):
functionLib.pdqisExist(xpath, value);
Command Parameters
a String specifying the object path.
a String specifying the rn
value.
Example
Detects whether or not the specified object exists and prints the custom message.
//Using Java variable.
Boolean pdqexists = functionLib.pdqisExist("/web:window" +
"/web:document" +
"/web:form[@name='SWEForm0']" +
"/web:select[(@name='s_pdq')]", "");
if (pdqexists)
{
System.out.println("PDQ object exists");
}
else
{
System.out.println("PDQ object does not exist");
}
Detects the number of objects of a given type that are present in the current context.
Format
The functionLib.pdqItemCount method has the following command format(s):
functionLib.pdqItemCount(xpath);
Example
Gets the number of objects in the current context of the PDQ object and prints the custom message.
//Using Java variable.
int items = functionLib.pdqItemCount("/web:window" +
"/web:document" +
"/web:form[@name='SWEForm0']" +
"/web:select[(@name='s_pdq')]");
System.out.println("PDQ items count is "+items);
Gets the rn
attribute of the target HTML element defined by the xpath.
Format
The functionLib.pdqRepositoryName method has the following command format(s):
functionLib.pdqRepositoryName(xpath);
Example
Gets the rn
attribute of the PDQ object and prints the custom message.
//Using Java variable.
String pdqRP = functionLib.pdqRepositoryName("/web:window" +
"/web:document" +
"/web:form[@name='SWEForm0']" +
"/web:select[(@name='s_pdq')]");
if(pdqRP.equals("Health"))
{
System.out.println("Pass");
}
else
{
System.out.println("Fail");
}
Gets the un
attribute of the target HTML element defined by the xpath.
Format
The functionLib.pdqUiName method has the following command format(s):
functionLib.pdqUiName(xpath);
Example
Gets the un
attribute of the PDQ object and prints the custom message.
//Using Java variable.
String pdqUI = functionLib.pdqUiName("/web:window" +
"/web:document" +
"/web:form[@name='SWEForm0']" +
"/web:select[(@name='s_pdq')]");
if(pdqUI.equals("Health"))
{
System.out.println("Pass");
}
else
{
System.out.println("Fail");
}
Gets the value representing the currently selected item from the Picklist.
This Function should be used only for Form Applets.
Format
The functionLib.pickListActiveItem method has the following command format(s):
functionLib.pickListActiveItem(xpath);
functionLib.pickListActiveItem(xpath, row);
Command Parameters
a String specifying the object path should be taken from the specified column header from the List Applet.
an Integer value specifying the row number from the List Applet (should always start from one).
Example
Gets the value with specified row (2) from the Picklist object and prints the custom message.
//Using Java variable.
String value = functionLib.pickListActiveItem("/web:window" +
"/web:document" +
"/web:div[@rn='Priority' and @ot='JComboBox' " +
"and @un='Priority']", 2);
if(value.equals("medium"))
{
System.out.println("Pass");
}
else
{
System.out.println("Fail");
}
Gets the class attribute of the target HTML element defined by the xpath.
Common for both Form and List Applet objects.
Format
The functionLib.pickListClassName method has the following command format(s):
functionLib.pickListClassName(xpath);
Example
Gets the UI name of the picklist object and prints the custom message.
//Using Java variable.
String classname = functionLib.pickListClassName("/web:window" +
"/web:document" +
"/web:form[@name='SWEForm2_0']" +
"/web:input_text[@rn='State' and @ot='JComboBox' " +
"and @un='State']");
System.out.println("Class name is "+classname);
Gets the number of items are present in the Picklist object for the List Applet.
This functions should be used only for the List Applet.
Format
The functionLib.pickListCount method has the following command format(s):
functionLib.pickListCount(xpath);
functionLib.pickListCount(xpath, row);
Command Parameters
a String specifying the object path.
an Integer specifying the row number from the List Applet (should always start from one) .
Example
Gets the number of items of the Picklist object for the Form Applet and prints the custom message.
//Using Java variable.
int number = functionLib.pickListCount("/web:window" +
"/web:document" +
"/web:input_text[@rn='Status' and @ot='JComboBox' " +
"and @un='Status']", 2);
System.out.println("Number of items is "+number );
Gets the specfied attribute (rn
, un
, classname
, value
) of the target HTML element defined by the path.
This function should be used only for List Applet objects.
Format
The functionLib.pickListGetROProperty method has the following command format(s):
functionLib.pickListGetROProperty(xpath, propertyname);
functionLib.pickListGetROProperty(columnxpath, propertyname, row);
Command Parameters
a String specifying the object path.
a String specifying the property(for example, rn
, un
, classname
, value
) to get.
a String specifying the column path.
an Integer specifying the row number from the List Applet (should always start from one).
Example
Gets the value of the picklist element with the attribute value
and prints the custom message.
String getAttribute13 = functionLib.pickListGetROProperty("/web:window" +
"/web:document" +
"/web:input_text[@rn='State' and @ot='JComboBox' " +
"and @un='State']", "value" , 2);
if(getAttribute13.equals("CA"))
{
System.out.println("Pass");
}
else
{
System.out.println("Fail");
}
Detects whether the PickList object is enabled or disabled.
This function should be used only for List Applets.
Format
The functionLib.pickListIsEnabled method has the following command format(s):
functionLib.pickListIsEnabled(xpath);
functionLib.pickListIsEnabled(xpath, row);
Command Parameters
a String specifying the object path.
an Integer specifying the row number from the List Applet (should always start from one).
Example
Detects whether the PickList object is enabled or disabled and prints a custom message based on whether PickList object is enabled or disabled.
//Using Java variable.
boolean pklst = functionLib.pickListIsEnabled("/web:window" +
"/web:document" +
"/web:div[@rn='Primary Revenue Class' and @ot='JComboBox' " +
"and @un='Revenue Class']", 5);
if(pklst)
{
System.out.println("Enabled");
}
else
{
System.out.println("Disabled");
}
Detects the existence of the Picklist item in the given LOV list.
Format
The functionLib.picklistItemIsExist method has the following command format(s):
functionLib.picklistItemIsExist(xpath, ItemName);
functionLib.picklistItemIsExist(xpath, ItemName, row);
Command Parameters
a String specifying the object path.
a String to be checked for the existence.
an Integer specifying the row number from the List Applet (should always start from one).
Example
Detects the existence of the Picklist item in the given LOV list.
//Using Java variable.
boolean value = functionLib.picklistItemIsExist("/web:window" +
"/web:document" +
"/web:input_text[@rn='Status' and @ot='JComboBox' " +
"and @un='Status']", "Open", 5);
if(value)
{
System.out.println("Exists");
}
else
{
System.out.println("Does Not exist");
}
Gets the rn
attribute of the target HTML element defined by the xpath.
Common for both Form and List Applet objects.
Format
The functionLib.pickListRepositoryName method has the following command format(s):
functionLib.pickListRepositoryName(xpath);
Example
Gets the repository name of the picklist object and prints the custom message.
//Using Java variable.
String pickRP = functionLib.pickListRepositoryName("/web:window" +
"/web:document" +
"/web:form[@name='SWEForm2_0']" +
"/web:input_text[@rn='State' and @ot='JComboBox' " +
"and @un='State']");
if(pickRP.equals("some repository name"))
{
System.out.println("Pass");
}
else
{
System.out.println("Fail");
}
Set text to target Picklist element.
This function should be used only for the List Applet.
Format
The functionLib.pickListSetText method has the following command format(s):
functionLib.pickListSetText(xpath, value);
functionLib.pickListSetText(xpath, value, row);
Gets the un
attribute of the target HTML element defined by the xpath.
Common for both Form and List Applet objects.
Format
The functionLib.pickListUIName method has the following command format(s):
functionLib.pickListUIName(xpath);
Example
Gets the UI name of the picklist object and prints the custom message.
//Using Java variable.
String pickUI = functionLib.pickListUIName("/web:window" +
"/web:document" +
"/web:form[@name='SWEForm2_0']" +
"/web:input_text[@rn='State' and @ot='JComboBox' " +
"and @un='State']");
if(pickUI.equals("State"))
{
System.out.println("Pass");
}
else
{
System.out.println("Fail");
}
Gets the number of currently visible rows (determined by show more/less).
Format
The functionLib.rowCount method has the following command format(s):
functionLib.rowCount(xpath);
Command Parameters
a String specifying the object path should be taken from the any column header from the List Applet.
Example
Gets the row count of the List Applet and prints the custom message.
//Using Java variable.
int rows = functionLib.rowCount("/web:window" +
"/web:document" +
"/web:div[@rn='Account' and @ot='JText' " +
"and @un='Account']");
for(int i = 1; i< rows ; i++)
{
System.out.println("Record number "+ i );
}
Gets the propertyname
attribute of the target HTML element defined by the path.
Format
The functionLib.screenGetRoProperty method has the following command format(s):
functionLib.screenGetRoProperty(propertyName);
Clicks on the element inside the specified cell.
Format
The functionLib.selectCell method has the following command format(s):
functionLib.selectCell(xpath, row);
Command Parameters
a String specifying the object path should be taken from the specified column header from the List Applet..
an Integer specifying the row number from the List Applet (should always start from one).
Example
Gets the rows count of the List Applet, loops, and selects the cell for all the rows.
//Using Java variable.
int rows = functionLib.rowCount("/web:window" +
"/web:document" +
"/web:div[@rn='Type' and @ot='JComboBox' " +
"and @un='Account Type']");
for(int i = 1; i< rows ; i++)
{
functionLib.selectCell("/web:window" +
"/web:document" +
"/web:div[@rn='Type' and @ot='JComboBox' " +
"and @un='Account Type']", i );
}
Sets the value of the input in the specified cell.
Format
The functionLib.SetCellData method has the following command format(s):
functionLib.SetCellData(xpath, row, value);
Command Parameters
a String specifying the object path should be taken from the specified column header from the List Applet.
an Integer specifying the row number from the List Applet (should always start from one).
a String to be set.
Example
Sets the value of the input in the specified cell.
//Using Java variable.
int rows = functionLib.rowCount("/web:window" +
"/web:document" +
"/web:div[@rn='Type' and @ot='JComboBox' " +
"and @un='Account Type']") ;
for(int i = 1; i< rows ; i++)
{
functionLib.SetCellData("/web:window" +
"/web:document" +
"/web:div[@rn='Type' and @ot='JComboBox' " +
"and @un='Account Type']", i, "Commercial");
}
he text when the field has same repository name across multiple applets in same screen and modifies or renames the text in the text
Format
The functionLib.SetText method has the following command format(s):
functionLib.SetText(xpath, value);
functionLib.SetText(xpath, value, row);
functionLib.SetText(xpath, value, row, AppletRepName);
Command Parameters
a String specifying the object path should be taken from the specified column header from the List Applet.
a String to be set.
an Integer specifying the row number from the List Applet (should always start from one).
a String specifying the repository name of the Applet.
Example
Gets the rows count of the List Applet, loops and sets the Text for all the rows with a specified columns.
//Using Java variable.
int rows = functionLib.rowCount("/web:window" +
"/web:document" +
"/web:div[@rn='Name' and @ot='JText']");
for(int i = 1; i< rows ; i++)
{
functionLib.SetText("/web:window" +
"/web:document" +
"/web:div[@rn='Description' and @ot='JText']",
"Commercial", i,"SM Social Media Admin Services Applet" );
}
Sets text to the specified cell (textarea) in the list.
Format
The functionLib.setTextArea method has the following command format(s):
functionLib.setTextArea(xpath, value, row);
Command Parameters
a String specifying the object path. Should be taken from the specified column header from the List Applet.
a String to be set.
an integer specifying the row number from the List Applet (should always start from one).
Example
Gets the rows count of the List applet, loops and sets the text for all the rows with the specified columns.
int rows = functionLib.rowCount("/web:window" +
"/web:document" +
"/web:div[@rn='Description' " +
"and @ot='JTextArea']") ;
for(int i = 1; i< rows ; i++)
{
functionLib.setTextArea("/web:window" +
"/web:document" +
"/web:div[@rn='Description' " +
"and @ot='JTextArea']","Commercial", i );
}
Detects whether the specified view exists or not.
Format
The functionLib.siebScreenViewsIsExists method has the following command format(s):
functionLib.siebScreenViewsIsExists(RepositoryName, siebScreenViewsLevel);
Command Parameters
a String specifying the object repository name.
a String specifying the level of the view for example, L2, L3 and L4.
Example
Detects whether the view specified by RepositoryName and siebScreenViewsLevel with the attribute rn
exists or not and prints the custom message.
//Using Java variable.
String value = functionLib.siebScreenViewsIsExists("Account Detail - Activities View", "L3");
System.out.println("The Required view exist is "+value);
if(value.equals("true"))
{
System.out.println("Required view exists");
}
else
{
System.out.println("Required view does not exist");
}
Detects whether or not the filtered count for the entered text is displayed on the sitemap screen on sitemap search operation.
Format
The functionLib.sitemapFilterTextIsExists method has the following command format(s):
functionLib.sitemapFilterTextIsExists( );
Returns
String true
if the filtered text count is displayed on the sitemap on performing sitemap search else returns false
if the text is not displayed.
Example
Detects whether or not the filtered count for the entered text is displayed on the sitemap screen.
//Using Java variable.
web.textBox(17,"/web:window" +
"/web:document" +
"/web:input_text[@id='sitemapFilterInput']")
.click();
ft.typeCharacters("Activities");
String sitemapfiltertextIsExists = functionLib.sitemapFilterTextIsExists();
if (sitemapfiltertextIsExists.equals("true"))
{
System.out.println("Exists");
}
else
{
System.out.println("Does not exist");
}
Detects whether or not the sitemap screen is displayed on click of sitemap icon.
Format
The functionLib.sitemapIsExists method has the following command format(s):
functionLib.sitemapIsExists( );
Returns
String true
if the search box field is present in the sitemap screen else returns false
if the sitemap screen does not exist.
Example
Detects whether or not the sitemap screen is displayed on click of sitemap icon.
//Using Java variable.
web.image(15,"/web:window" +
"/web:document" +
"/web:img[@src='/images/icon_sitemap_1.gif']")
.click();
String sitemapscreenisexists = functionLib.sitemapIsExists();
if (sitemapscreenisexists.equals("true"))
{
System.out.println("Exists");
}
else
{
System.out.println("Does not exist");
}
Gets the number of 2nd level views present for a particular screen.
Format
The functionLib.sitemapScreen2ndLevelViewCount method has the following command format(s):
functionLib.sitemapScreen2ndLevelViewCount(xpath);
Command Parameters
a String specifying the xpath of the screen in the sitemap for which the number of second level views is to be retrieved.
Example
Gets the number of 2nd level views present for the Activities screen.
//Using Java variable.
String Level2Views = functionLib.sitemapScreen2ndLevelViewCount("//web:a[@rn='Sitemap.Activities Screen' " +
"and @ot='SiebWebSitemapScreen' or @un='Activities']");
int secondLeveldviewcount = Integer.parseInt(Level2Views);
System.out.println("View count is "+secondLeveldviewcount);
Gets the number of 3rd level views present for a particular screen.
Format
The functionLib.sitemapScreen3rdLevelViewCount method has the following command format(s):
functionLib.sitemapScreen3rdLevelViewCount(xpath);
Command Parameters
a String specifying the xpath of the screen in the sitemap for which the number of third level views is to be retrieved.
Example
Gets the number of 3rd level views present for the Activities screen.
//Using Java variable.
String Level3Views = functionLib.sitemapScreen3rdLevelViewCount("//web:a[@rn='Sitemap.Activities Screen' " +
"and @ot='SiebWebSitemapScreen' or @un='Activities']");
int thirdLeveldviewcount = Integer.parseInt(Level3Views);
System.out.println("View count is "+thirdLeveldviewcount);
Gets the number of 4th level views present for a particular screen.
Format
The functionLib.sitemapScreen4thLevelViewCount method has the following command format(s):
functionLib.sitemapScreen4thLevelViewCount(xpath);
Command Parameters
a String specifying the xpath of the screen in the sitemap for which the number of fourth level views is to be retrieved.
Example
Gets the number of 4th level views present for the Activities screen.
//Using Java variable.
String Level4Views = functionLib.sitemapScreen4thLevelViewCount("//web:a[@rn='Sitemap.Accounts Screen' " +
"and @ot='SiebWebSitemapScreen' or @un='Accounts']");
int fourthLeveldviewcount = Integer.parseInt(Level4Views);
System.out.println("View count is "+fourthLeveldviewcount);
Gets the count of the number of occurrences of the specified text in the sitemap search box.
Format
The functionLib.sitemapSearchBoxCount method has the following command format(s):
functionLib.sitemapSearchBoxCount( );
Example
Gets the count of the number of occurrences of the specified text in the sitemap search box.
//Using Java variable.
web.textBox(17,"/web:window" +
"/web:document" +
"/web:input_text[@id='sitemapFilterInput']")
.click();
ft.typeCharacters("Activities");
String sitemapsearchboxCount = functionLib.sitemapSearchBoxCount();
System.out.println("Search box count is "+sitemapsearchboxCount);
Detects whether or not the searchbox field exists in the sitemap screen.
Format
The functionLib.sitemapSearchBoxIsExists method has the following command format(s):
functionLib.sitemapSearchBoxIsExists( );
Returns
String true
if the search box field is present in the sitemap screen else returns false
if the search box field is not present.
Example
Detects whether or not the searchbox field exists in the sitemap screen.
//Using Java variable.
web.image(15,"/web:window" +
"/web:document" +
"/web:img[@src='/images/icon_sitemap_1.gif']")
.click();
String sitemapSearchBoxIsExists = functionLib.sitemapSearchBoxIsExists();
if (sitemapSearchBoxIsExists.equals("true"))
{
System.out.println("Exists");
}
else
{
System.out.println("Does not exist");
}
Sorts the table in descending order based on the contents of the specified column.
Format
The functionLib.sortDown method has the following command format(s):
functionLib.sortDown(xpath);
Sorts the table in ascending order based on the contents of the specified column.
Format
The functionLib.sortUp method has the following command format(s):
functionLib.sortUp(xpath);
Gets the specified attribute (Property
) of the target HTML element defined by the path.
Format
The functionLib.Static method has the following command format(s):
functionLib.Static(xpath);
Example
Gets the text attribute value for the dialog pop-up object element and prints the custom message.
//Using Java variable.
String value = functionLib.Static("/web:dialog_confirm[]" +
"/web:accStaticText[@name='Are you sure you want to delete the selected " +
"record in 'Opportunities'?']");
System.out.println("Text attribute value for the dialog pop-up is "+value);
Gets the specified attribute (Property
) of the target HTML element defined by the path.
Format
The functionLib.staticDialogGetROProperty method has the following command format(s):
functionLib.staticDialogGetROProperty(xpath);
Example
Gets the text attribute value for the dialog pop-up object element and prints the custom message.
//Using Java variable.
String value = functionLib.staticDialogGetROProperty("/web:dialog_confirm[]" +
"/web:accStaticText[@name='Are you sure you want to delete the selected " +
"record in 'Opportunities'?']");
System.out.println("Text attribute value for the dialog pop-up is "+value);
Gets the class attribute of the target HTML element defined by the xpath.
This function should be used for both List and Form Applets.
Format
The functionLib.textAreaClassName method has the following command format(s):
functionLib.textAreaClassName(xpath);
Example
Gets the class name of the Textarea object and prints the custom message.
//Using Java variable.
String Textarea = functionLib.textAreaClassName("/web:window" +
"/web:document" +
"/web:div[@rn='Abstract' and @ot='JTextArea' " +
"and @un='Summary']");
System.out.println("class name is "+Textarea);
Gets the specfied attribute (rn
, un
, classname
, value
) of the target HTML element defined by the path.
This function should be used only for Form Applet objects.
Format
The functionLib.textAreaGetROProperty method has the following command format(s):
functionLib.textAreaGetROProperty(xpath, propertyname);
functionLib.textAreaGetROProperty(xpath, propertyname, row);
Command Parameters
a String specifying the object path should be taken from the specified column header from the List Applet.
a String specifying the property (for example, rn
, un
, classname
, value
) to get.
integer specifying the row number from the List Applet (should always start from one).
Example
Gets the value of the Text Area element with the attribute value
and prints the custom message if it matches the required value.
//Using Java variable.
String getAttribute = functionLib.textAreaGetROProperty("/web:window" +
"/web:document" +
"/web:div[@rn='Abstract' and @ot='JTextArea' " +
"and @un='Summary']", "value");
if(getAttribute.equals("some discription"))
{
System.out.println("Pass");
}
else
{
System.out.println("Fail");
}
Detects whether the Textarea object is enabled or disabled.
This function should be used only for Form Applets.
Format
The functionLib.textareaIsEnabled method has the following command format(s):
functionLib.textareaIsEnabled(xpath);
functionLib.textareaIsEnabled(xpath, row);
Command Parameters
a String specifying the object path.
an integer specifying the row number.
Example
Detects whether the Textarea object is enabled or disabled and prints a custom message.
//Using Java variable.
boolean Textarea = functionLib.textareaIsEnabled("/web:window" +
"/web:document" +
"/web:div[@rn='Abstract' and @ot='JTextArea' " +
"and @un='Summary']", 1);
if(Textarea)
{
System.out.println("Pass");
}
else
{
System.out.println("Fail");
}
Gets the rn
attribute of the target HTML element defined by the xpath.
This function should be used for both List and Form Applet.
Format
The functionLib.textAreaRepositoryName method has the following command format(s):
functionLib.textAreaRepositoryName(xpath);
Example
Gets the repository name of the Textarea object and prints the custom message.
//Using Java variable.
String Textarea = functionLib.textAreaRepositoryName("/web:window" +
"/web:document" +
"/web:div[@rn='Abstract' and @ot='JTextArea' " +
"and @un='Summary']");
System.out.println("Repository name is "+Textarea);
Gets the text value of the target HTML element defined by the xpath.
This Function should be used only for Form Applets.
Format
The functionLib.textAreaText method has the following command format(s):
functionLib.textAreaText(xpath);
functionLib.textAreaText(xpath, row);
Command Parameters
a String specifying the object path should be taken from the specified column header from the List Applet.
an Integer value specifying the row number from the List Applet (should always start from one).
Example
Gets the text value from the object for the second row of the List Applet and prints the custom message.
//Using Java variable.
String value = functionLib.textAreaText("/web:window" +
"/web:document" +
"/web:div[@rn='Abstract' and @ot='JTextArea' " +
"and @un='Summary']", 2);
if(value.equals("some description"))
{
System.out.println("Pass");
}
else
{
System.out.println("Fail");
}
Gets the un
attribute of the target HTML element defined by the xpath.
This function should be used for both List and Form Applet.
Format
The functionLib.textAreaUiName method has the following command format(s):
functionLib.textAreaUiName(xpath);
Example
Gets the UI name of the Textarea object and prints the custom message.
//Using Java variable.
String Textarea = functionLib.textAreaUiName("/web:window" +
"/web:document" +
"/web:div[@rn='Abstract' and @ot='JTextArea' " +
"and @un='Summary']");
System.out.println("Repository name is "+Textarea);
Gets the specfied attribute (text
, un
, rn
, classname
, isenabled
) of the target HTML element defined by the path.
This function should be used only for List Applet objects.
Format
The functionLib.textGetROProperty method has the following command format(s):
functionLib.textGetROProperty(xpath, propertyname);
functionLib.textGetROProperty(xpath, propertyname, row);
Command Parameters
a String specifying the object path should be taken from the specified column header from the List Applet.
a String specifying the property (for example, text
, un
, rn
, classname
, isenabled
) to get.
an Integer specifying the row number from the List Applet (should always start from one).
Example
Gets the value of the text element with the attribute text
and prints the custom message if matches the required value.
//Using Java variable.
String getAttribute = functionLib.textGetROProperty("/web:window" +
"/web:document" +
"/web:div[@rn='Name' and @ot='JText' " +
"and @un='Name']", "text", 2 );
if(getAttribute.equals("SAM"))
{
System.out.println("Pass");
}
else
{
System.out.println("Fail");
}
Detects whether the Text object is enabled or disabled from the target HTML element defined by the xpath.
This function should be used only for List Applets.
Format
The functionLib.textIsEnabled method has the following command format(s):
functionLib.textIsEnabled(xpath);
functionLib.textIsEnabled(xpath, row);
Command Parameters
a String specifying the object path.
an Integer specifying the row number from the List Applet (should always start from one).
Example
Detects whether the Text object is enabled or disabled for the fifth row of the List Applet and prints a custom message based on whether Text object is enabled or disabled.
//Using Java variable.
boolean text = functionLib.textIsEnabled("/web:window" +
"/web:document" +
"/web:div[@rn='Contact Last Name' and @ot='JText' " +
"and @un='Last Name']", 5);
if(text)
{
System.out.println("Enabled");
}
else
{
System.out.println("Disabled");
}
Detects the type of popup associated with the textbox from the target HTML element defined by the xpath.
This function should be used only for List Applets.
Format
The functionLib.textPopupType method has the following command format(s):
functionLib.textPopupType(xpath);
functionLib.textPopupType(xpath, row);
Command Parameters
a String specifying the object path.
an integer specifying the row number from the List Applet (should always start from one).
Example
Gets the type of popup associated with textbox for the second row of the List Applet and prints the custom message.
//Using Java variable.
String type1 = functionLib.textPopupType("/web:window" +
"/web:document" +
"/web:div[@rn='Contact Last Name' and @ot='JText' " +
"and @un='Last Name']", 2);
if(type1.equals("MVPick"))
{
System.out.println("MVPick");
}
else
{
System.out.println("Text");
}
Gets the rn
attribute of the Text object of the target HTML element defined by the xpath.
This function should be used for both List and Form Applet.
Format
The functionLib.textRepositoryName method has the following command format(s):
functionLib.textRepositoryName(xpath);
Example
Gets the rn
attribute of the Text object and prints the custom message.
//Using Java variable.
String textRN = functionLib.textRepositoryName("/web:window" +
"/web:document" +
"/web:input_text[@rn='Name' and @ot='JText' " +
"and @un='Account Name']");
System.out.println("text repository name is "+textRN);
Gets the text value of the target HTML element defined by the xpath.
This Function should be used only for List Applets.
Format
The functionLib.textText method has the following command format(s):
functionLib.textText(xpath);
functionLib.textText(xpath, row);
Command Parameters
a String specifying the object path.
an Integer value specifying the row number from the List Applet (should always start from one).
Example
Gets the text value from the object for the second row of the List Applet and prints the custom message.
//Using Java variable.
String value20 = functionLib.textText("/web:window" +
"/web:document" +
"/web:div[@rn='Contact Last Name' and @ot='JText' " +
"and @un='Last Name']", 2);
if(value20.equals("sam"))
{
System.out.println("Pass");
}
else
{
System.out.println("Fail");
}
Gets the count
attribute of the target HTML element defined by the path.
Format
The functionLib.toolBarCount method has the following command format(s):
functionLib.toolBarCount( );
Detects whether a particular toolbar item is enabled on the target HTML element defined by the path.
Format
The functionLib.toolbarItemIsEnabled method has the following command format(s):
functionLib.toolbarItemIsEnabled(xpath);
Example
Checks whether sitemap toolbar icon is enabled.
//Using Java variable.
String toolbarIsEnabled = functionLib.toolbarItemIsEnabled("/web:window" +
"/web:document" +
"/web:img[@src='/images/icon_sitemap_1.gif']");
if (toolbarIsEnabled.equals("true"))
{
System.out.println("Enabled");
}
else
{
System.out.println("Not enabled");
}
Gets the uiname
attribute of the target HTML element defined by the path.
Format
The functionLib.viewAppletGetUiName method has the following command format(s):
functionLib.viewAppletGetUiName(AppRepName);
Detects whether the specified viewApplet object exists or not.
Format
The functionLib.viewAppletIsExist method has the following command format(s):
functionLib.viewAppletIsExist(AppRepName);
Example
Detects whether the viewApplet exists or not and prints a custom message.
//Using Java variable.
boolean value = functionLib.viewAppletIsExist("SIS Account List Applet");
if(value)
{
System.out.println("viewApplet object exists");
}
else
{
System.out.println("viewApplet object does not exist");
}
Gets the specified attribute (UI Name) of the target HTML element defined by the path.
Format
The functionLib.viewUiName method has the following command format(s):
functionLib.viewUiName( );
Gets the currently active visibility filter item name in the List Applet.
Format
The functionLib.visibilityFilterActiveItem method has the following command format(s):
functionLib.visibilityFilterActiveItem( );
Example
Gets the currently active visibility filter item name.
//Using Java variable.
web.link(18,"//web:a[@rn='Sitemap.Activity List View' " +
"and @ot='SiebWebSitemapView' or @un='Activity List']")
.click();
String activeVisibilityFilterName = functionLib.visibilityFilterActiveItem();
System.out.println("Filter Name is "+activeVisibilityFilterName);
Gets the specified attribute (Item
) of the target HTML element defined by the path.
Format
The functionLib.webListGetItemByIndex method has the following command format(s):
functionLib.webListGetItemByIndex(xpath, index);
Command Parameters
a String specifying the object path.
an integer specifying the object location.
Example
Gets the Item of the Weblist object element and prints the custom message.
//Using Java variable.
String value = functionLib.webListGetItemByIndex("/web:window[]" +
"/web:document[]" +
"/web:form[@name='SWEForm1_0']" +
"/web:select[(@id='s_1_l_searchField') " +
"and multiple mod 'False']", 4);
System.out.println("web list item selected is "+value);
Gets the Itemcount
attribute of the target HTML element defined by the path.
Format
The functionLib.webListItemCount method has the following command format(s):
functionLib.webListItemCount(xpath);
Example
Gets the total number of list items for the given Xpath and prints the custom message.
//Using Java variable.
int value = functionLib.webListItemCount("/web:window[]" +
"/web:document[]" +
"/web:form[@name='SWEForm1_0']" +
"/web:select[(@id='s_1_l_searchField') " +
"and multiple mod 'False']");
System.out.println("Total number of list items is "+value);
Selects the specified Item in a web list for the given Xpath and index of the target HTML element.
Format
The functionLib.webListSelectItemByIndex method has the following command format(s):
functionLib.webListSelectItemByIndex(xpath, index);
Selects the item in a web list for the specified Xpath and Value of the target HTML element.
Format
The functionLib.webListSelectItemByValue method has the following command format(s):
functionLib.webListSelectItemByValue(xpath, Name);