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 18, "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.company.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 20-1 List of Siebel OpenUI Function Library Enums
Enum | Description |
---|---|
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 20-2 List of Siebel OpenUI Function Library Methods
Method | Description |
---|---|
Gets the active tree item in the specified Applet. |
|
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 ( |
|
Gets the |
|
Gets the |
|
Gets the Applet count under the current screen. |
|
Gets the specified attribute ( |
|
Gets the Repository Name of the active Applet. |
|
Gets the UI name of the active Applet. |
|
Gets the |
|
Gets the specfied attribute ( |
|
Gets the |
|
Gets the |
|
Gets the |
|
Clicks on any button with specified repository name in the List or Form Applet. |
|
Gets the specified attribute ( |
|
Gets the specfied attribute ( |
|
Detects whether the calculator object is enabled or disabled. |
|
Detects whether the specified calculator popup is open or closed. |
|
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. |
|
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. |
|
Gets the calendar month value in the List Applet. |
|
Gets the year value of the Calendar object in the Form Applet. |
|
Gets the calendar year value in the List Applet. |
|
Gets the |
|
Gets the specfied attribute ( |
|
Detects whether the calendar object is enabled or disabled. |
|
Gets the |
|
Gets the |
|
Gets the |
|
Gets the specified attribute( |
|
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). |
|
Gets the |
|
Gets the |
|
Detects whether or not the communication toolbar object is enabled from the target HTML element defined by the xpath. |
|
Gets the |
|
Gets the |
|
Gets the |
|
Gets the |
|
Gets the |
|
Gets the |
|
Returns the Currency Code value of the currency field in the List Applet. |
|
Gets the |
|
Gets the |
|
Gets the specified attribute ( |
|
Detects whether the currency object is enabled or disabled. |
|
Detects whether the specified Currency popup is open or closed. |
|
Gets the |
|
Gets the |
|
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. |
|
Gets the |
|
Gets the |
|
Gets the |
|
Gets the color of the icon in the List Applet. |
|
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. |
|
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. |
|
Gets the |
|
Gets the |
|
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. |
|
Gets the |
|
Detects whether or not the specified Pagetab object exists. |
|
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. |
|
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. |
|
Gets the specfied attribute ( |
|
Detects whether the PickList object is enabled or disabled. |
|
Gets the |
|
Set text to target Picklist element. |
|
Gets the |
|
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. |
|
Gets the |
|
Gets the |
|
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. |
|
Gets the |
|
Detects whether the specified view exists or not. |
|
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. |
|
Gets the number of 2nd level views present for a particular screen. |
|
Gets the number of 3rd level views present for a particular screen. |
|
Gets the number of 4th level views present for a particular screen. |
|
Gets the count of the number of occurrences of the specified text in the sitemap search box. |
|
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. |
|
Gets the specified attribute ( |
|
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. |
|
Gets the specfied attribute ( |
|
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. |
|
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. |
|
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 ( |
|
Detects whether a particular toolbar item is enabled on the target HTML element defined by the path. |
|
Gets the |
|
Gets the |
|
Gets the specified attribute ( |
|
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 ( |
|
Gets the |
|
Gets the specified attribute (UI Name) of the target HTML element defined by the path. |
|
Gets the currently active visibility filter item name in the List Applet. |
|
Waits until the Document Object Model (DOM) of the page gets loaded. |
|
Gets the specified attribute ( |
|
Gets the |
|
Selects the specified Item in a web list for the given Xpath and index of the target HTML element. |
|
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.
The functionLib.activateRow method has the following command format(s):
functionLib.activateRow(xpath, row);
a String specifying the object path. Should be taken from any column header from the List Applet.
an Integer specifying the row number from the List Applet (should always start from one).
Gets the specified attribute (RepositoryName
) of the activeScreen of the target HTML element defined by the path.
The functionLib.activeScreen method has the following command format(s):
functionLib.activeScreen( );
the RepositoryName (un
SiebelPageTab object attribute) of the activeScreen, as represented by the active Aggregate Category link.
Gets the specified attribute (RepositoryName
) of the active view of the target HTML element defined by the path.
The functionLib.activeView method has the following command format(s):
functionLib.activeView( );
the RepositoryName (rn
attribute) of the active view, as represented by the active Aggregate Category link.
Gets the property
attribute of the target HTML element defined by the path.
The functionLib.advancededitGetRoProperty method has the following command format(s):
functionLib.advancededitGetRoProperty(propertyName, xpath);
a String specifying the property (for example, classname
, rn
, un
, value
) to get.
a String specifying the object path.
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.
The functionLib.appletGetROProperty method has the following command format(s):
functionLib.appletGetROProperty(propertyName);
a String specifying the property (For example, un
, rn
, exist
) to get.
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.
The functionLib.ApplicationMenuClick method has the following command format(s):
functionLib.ApplicationMenuClick(unLIAppMenuItem, unLIAppSubmenuItem);
a String specifying the UN attribute of the Main menu Link. For example, File, Edit, View, etc.
a String specifying the UN attribute of the Link which is present inside the main menu item. For example, Logout, Action Pane, etc.
Gets the specfied attribute (text
, un
, rn
, classname
, isenabled
) of the target HTML element defined by the path.
The functionLib.buttonGetRoProperty method has the following command format(s):
functionLib.buttonGetRoProperty(xpath, propertyName);
a String specifying the object xpath.
a String specifying the property (For example, text
, un
, rn
, classname
, isenabled
) to get.
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.
The functionLib.buttonIsEnabled method has the following command format(s):
functionLib.buttonIsEnabled(xpath);
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.
The functionLib.buttonRepositoryName method has the following command format(s):
functionLib.buttonRepositoryName(xpath);
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.
The functionLib.buttonUIName method has the following command format(s):
functionLib.buttonUIName(xpath);
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.
The functionLib.calculatorClassName method has the following command format(s):
functionLib.calculatorClassName(xpath);
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.
The functionLib.calculatorGetROProperty method has the following command format(s):
functionLib.calculatorGetROProperty(xpath, propertyname);
functionLib.calculatorGetROProperty(xpath, propertyname, row);
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).
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.
The functionLib.calculatorIsEnabled method has the following command format(s):
functionLib.calculatorIsEnabled(xpath);
functionLib.calculatorIsEnabled(xpath, row);
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).
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.
The functionLib.calculatorIsOpen method has the following command format(s):
functionLib.calculatorIsOpen(xpath);
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.
The functionLib.calculatorRepositoryName method has the following command format(s):
functionLib.calculatorRepositoryName(xpath);
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.
The functionLib.calculatorText method has the following command format(s):
functionLib.calculatorText(xpath);
functionLib.calculatorText(xpath, row);
a String specifying the object path.
an Integer value specifying the row number from the List Applet (should always start from one).
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.
The functionLib.calculatorUiName method has the following command format(s):
functionLib.calculatorUiName(xpath);
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.
The functionLib.calendarDay method has the following command format(s):
functionLib.calendarDay(xpath);
functionLib.calendarDay(xpath, row);
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).
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.
The functionLib.calendarDayClick method has the following command format(s):
functionLib.calendarDayClick(xpath, day);
functionLib.calendarDayClick(xpath, row, day);
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.
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.
The functionLib.calendarDayListApplet method has the following command format(s):
functionLib.calendarDayListApplet(xpath, row);
a String specifying the object path should be taken from the specified column header from the List Applet.
an Integer specifying the row of the record in the List Applet for which the calendar day value is to be retrieved.
Detects whether the specified calendar popup is open or closed.
The functionLib.calendarIsOpen method has the following command format(s):
functionLib.calendarIsOpen(xpath);
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.
The functionLib.calendarMonth method has the following command format(s):
functionLib.calendarMonth(xpath);
functionLib.calendarMonth(xpath, row);
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).
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.
The functionLib.calendarMonthListApplet method has the following command format(s):
functionLib.calendarMonthListApplet(xpath, row);
a String specifying the object path should be taken from the specified column header from the List Applet.
an Integer specifying the row of the record in the List Applet for which the calendar month value is to be retrieved.
Gets the year value of the Calendar object in the Form Applet.
The functionLib.calendarYear method has the following command format(s):
functionLib.calendarYear(xpath);
functionLib.calendarYear(xpath, row);
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).
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.
The functionLib.calendarYearListApplet method has the following command format(s):
functionLib.calendarYearListApplet(xpath, row);
a String specifying the object path should be taken from the specified column header from the List Applet.
an Integer specifying the row of the record in the List Applet for which the calendar year value is to be retrieved.
Gets the classname
attribute of the target HTML element defined by the path.
The functionLib.calenderClassName method has the following command format(s):
functionLib.calenderClassName(xpath);
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.
The functionLib.calenderGetROProperty method has the following command format(s):
functionLib.calenderGetROProperty(xpath, propertyname);
functionLib.calenderGetROProperty(xpath, propertyname, row);
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).
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.
The functionLib.calenderIsEnabled method has the following command format(s):
functionLib.calenderIsEnabled(xpath);
functionLib.calenderIsEnabled(xpath, row);
a String specifying the object path.
an Integer specifying the row number from the List Applet (should always start from one).
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.
The functionLib.calenderUiName method has the following command format(s):
functionLib.calenderUiName(xpath);
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.
The functionLib.checkBoxClassName method has the following command format(s):
functionLib.checkBoxClassName(xpath);
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.
The functionLib.checkboxGetROProperty method has the following command format(s):
functionLib.checkboxGetROProperty(xpath, propertyName);
functionLib.checkboxGetROProperty(xpath, propertyName, row);
a String specifying the object path.
an Integer specifying the row number from the List Applet (should always start from one).
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.
The functionLib.checkboxRepositoryName method has the following command format(s):
functionLib.checkboxRepositoryName(xpath);
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.
The functionLib.checkBoxUIName method has the following command format(s):
functionLib.checkBoxUIName(xpath);
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.
The functionLib.clickDone method has the following command format(s):
functionLib.clickDone( );
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.
The functionLib.clickNow method has the following command format(s):
functionLib.clickNow( );
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).
The functionLib.columnCount method has the following command format(s):
functionLib.columnCount(xpath);
a String specifying the object path should be taken from the any column header from the List Applet.
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.
The functionLib.commToolbarClassname method has the following command format(s):
functionLib.commToolbarClassname(xpath);
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.
The functionLib.commToolbarGetRoProperty method has the following command format(s):
functionLib.commToolbarGetRoProperty(xpath, value);
a String specifying the object path.
a String specifying the value to check in the CommunicationsToolbar list (rn
, un
, name
and classname
).
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.
The functionLib.commToolbarIsEnabled method has the following command format(s):
functionLib.commToolbarIsEnabled(xpath);
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.
The functionLib.commToolbarRepositoryname method has the following command format(s):
functionLib.commToolbarRepositoryname(xpath);
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.
The functionLib.commToolbarShowButtonToolTip method has the following command format(s):
functionLib.commToolbarShowButtonToolTip(xpath);
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.
The functionLib.commToolbarText method has the following command format(s):
functionLib.commToolbarText(xpath);
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.
The functionLib.commToolbarUiName method has the following command format(s):
functionLib.commToolbarUiName(xpath);
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.
The functionLib.currencyAmount method has the following command format(s):
functionLib.currencyAmount(xpath);
functionLib.currencyAmount(xpath, rowid);
a String specifying the object path.
an integer specifying the row ID of the object (should always start from one).
Gets the class
attribute of the target HTML element defined by the xpath.
Common for both Form and List Applet.
The functionLib.currencyClassName method has the following command format(s):
functionLib.currencyClassName(xpath);
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.
The functionLib.currencyCode method has the following command format(s):
functionLib.currencyCode(xpath);
functionLib.currencyCode(xpath, rowid);
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.
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.
The functionLib.currencyGetROProperty method has the following command format(s):
functionLib.currencyGetROProperty(xpath, propertyname);
functionLib.currencyGetROProperty(xpath, propertyname, row);
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).
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.
The functionLib.currencyIsEnabled method has the following command format(s):
functionLib.currencyIsEnabled(xpath);
functionLib.currencyIsEnabled(xpath, row);
a String specifying the object path.
an Integer specifying the row number from the List Applet (should always start from one).
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.
The functionLib.currencyIsOpen method has the following command format(s):
functionLib.currencyIsOpen(xpath);
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.
The functionLib.currencyRepositoryName method has the following command format(s):
functionLib.currencyRepositoryName(xpath);
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.
The functionLib.CurrencyText method has the following command format(s):
functionLib.CurrencyText(xpath);
functionLib.CurrencyText(xpath, row);
a String specifying the object path.
an Integer value specifying the row number from the List Applet (should always start from one).
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.
The functionLib.currencyUiName method has the following command format(s):
functionLib.currencyUiName(xpath);
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.
The functionLib.DataLevel method has the following command format(s):
functionLib.DataLevel(xpath, row);
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).
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.
The functionLib.DataParentId method has the following command format(s):
functionLib.DataParentId(xpath, row);
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).
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.
The functionLib.dialogGetROProperty method has the following command format(s):
functionLib.dialogGetROProperty(xpath);
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.
The functionLib.Drilldown method has the following command format(s):
functionLib.Drilldown(xpath, row);
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).
Extracts and returns the ID attribute value of the given Xpath.
The functionLib.extractId method has the following command format(s):
functionLib.extractId(xpath, x, y, rowid);
a String specifying the object path.
a char value for specifying the ID attribute value to be extracted.
a char value for specifying the ID attribute value to be extracted.
an Integer specifying the row id value.
Generate the ID from the given row.
The functionLib.generateID method has the following command format(s):
functionLib.generateID(xpath, row);
a String specifying the object path should be taken from the specified column header from the List Applet.
an Integer specifying the row number.
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..
The functionLib.getCellData method has the following command format(s):
functionLib.getCellData(xpath, row);
functionLib.getCellData(xpath, row, AppletRepName);
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().
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.
The functionLib.getNumberMonth method has the following command format(s):
functionLib.getNumberMonth(val);
an integer that specifies the number for that month (should always start from zero). For example. 0, 1 ,2.
a String month for the corresponding number. For example, if val 0 is passed, the function returns "Jan". If val is 11, it returns "Dec".
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.
The functionLib.getPageTabRepositoryName method has the following command format(s):
functionLib.getPageTabRepositoryName(xpath);
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.
The functionLib.getPageTabRepositoryNameByIndex method has the following command format(s):
functionLib.getPageTabRepositoryNameByIndex(xpath, index);
a String specifying the object path.
an Integer. use inspect path on the element to get index.
The GetROPropertyImage enum has the following values:
Table 20-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 20-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.
The functionLib.Hcollapse method has the following command format(s):
functionLib.Hcollapse(xpath, row);
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).
Expands the specified row in the Hierarchial List Applet.
The functionLib.Hexpand method has the following command format(s):
functionLib.Hexpand(xpath, row);
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).
Gets the color of the icon in the List Applet.
The functionLib.iconColor method has the following command format(s):
functionLib.iconColor(xpath, row);
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).
Gets the property
attribute of the target HTML element defined by the path.
The functionLib.imageGetRoProperty method has the following command format(s):
functionLib.imageGetRoProperty(propertyName, xpath);
a String specifying the property (for example, classname
, isenabled
, repositoryname
, text
, uiname
) to get.
a String specifying the object path.
Detects whether or not the specified checkbox object is checked for the List Applet.
The functionLib.isCheckboxChecked method has the following command format(s):
functionLib.isCheckboxChecked(xpath);
functionLib.isCheckboxChecked(xpath, row);
a String specifying the object xpath.
an Integer specifying the row number for the List Applet (should always starts from one) .
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.
The functionLib.isCheckboxEnabled method has the following command format(s):
functionLib.isCheckboxEnabled(xpath);
functionLib.isCheckboxEnabled(xpath, row);
a String specifying the object xpath.
an Integer specifying the row number for the List Applet (should always start from one).
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.
The functionLib.isColumnExist method has the following command format(s):
functionLib.isColumnExist(AppletRepName, ColumnRepName);
a String specifying the RepositoryName of the Applet in which Column is present.
a String specifying the RepositoryName of the column.
Detects the the state of table column, where state is the value of the column's disabled or read-only property.
The functionLib.isColumnwritable method has the following command format(s):
functionLib.isColumnwritable(xpath);
a String specifying the object path should be taken from the specified column header from the List Applet.
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.
The functionLib.isHierarchialListExpanded method has the following command format(s):
functionLib.isHierarchialListExpanded(xpath, row);
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).
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.
The functionLib.isPopupApplet method has the following command format(s):
functionLib.isPopupApplet( );
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.)
The functionLib.isRequired method has the following command format(s):
functionLib.isRequired(xpath);
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.
The functionLib.linkGetRoProperty method has the following command format(s):
functionLib.linkGetRoProperty(propertyName, xpath);
a String specifying the property (for example, text
, uiname
, classname
, repositoryname
, isenabled
) to get.
a String specifying the object path.
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.
The functionLib.Login method has the following command format(s):
functionLib.Login(UserType, BrowserName, EnvName);
a String indicates the user type. for example, SADMIN, DJROSEN, BFSCRANT ,etc.
a String indicates the name of the browser. (For example, callcenter, eCommunications etc
a String Environment name created from the ATC portal.
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.
The functionLib.menuCount method has the following command format(s):
functionLib.menuCount(xpath);
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.
The functionLib.menuItemEnabled method has the following command format(s):
functionLib.menuItemEnabled(xpath);
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.
The functionLib.menuItemExist method has the following command format(s):
functionLib.menuItemExist(rn);
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.
The functionLib.menuItemGetRepositoryName method has the following command format(s):
functionLib.menuItemGetRepositoryName(xpath);
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.
The functionLib.menuItemRepositoryName method has the following command format(s):
functionLib.menuItemRepositoryName(xpath);
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).
The functionLib.monthMapping method has the following command format(s):
functionLib.monthMapping(vall);
a String that specifies the number for that month (should always starts from zero). For example, 0, 1, 2.
a String month for the corresponding number. For example, if val 0 is passed, the function returns "Jan". If val is 11, it returns "Dec".
Navigates to the Screen/View from SiteMap.
The functionLib.Navigate_Screen method has the following command format(s):
functionLib.Navigate_Screen(RepName, L1UIName, L2VName, L2UIName);
a String specifying the repository name.
a String specifying the level 1 SiteMap UI name.
a String specifying the level 2 SiteMap View name.
a String specifying the level 2 SiteMap UI name.
Clicks on the element inside the specified cell.
The functionLib.openCellElement method has the following command format(s):
functionLib.openCellElement(columnxpath, row);
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).
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.
The functionLib.openpopup method has the following command format(s):
functionLib.openpopup(xpath);
functionLib.openpopup(xpath, row);
a String specifying the object path.
an integer specifying the row number from the List Applet (should always start from one).
Detects whether or not the specified Pagetab object exists.
The functionLib.pageTabIsExists method has the following command format(s):
functionLib.pageTabIsExists(Xpath, TabRepName);
a String specifying the object path.
a String specifying the Repository Name of the object.
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.
The functionLib.pagetabsGetROProperty method has the following command format(s):
functionLib.pagetabsGetROProperty(propertyName);
a String specifying the property (Eg : pageTabActiveScreen
, activeView
, screenCount
, viewCount
) to get.
Gets the class name of the target HTML element defined by the path.
The functionLib.pdqClassName method has the following command format(s):
functionLib.pdqClassName(xpath);
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.
The functionLib.pdqGetROProperty method has the following command format(s):
functionLib.pdqGetROProperty(xpath, propertyName);
a String specifying the object path.
a String specifying the property (for example, rn
, un
, text
) to get.
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.
The functionLib.pdqisExist method has the following command format(s):
functionLib.pdqisExist(xpath, value);
a String specifying the object path.
a String specifying the rn
value.
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.
The functionLib.pdqItemCount method has the following command format(s):
functionLib.pdqItemCount(xpath);
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.
The functionLib.pdqRepositoryName method has the following command format(s):
functionLib.pdqRepositoryName(xpath);
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.
The functionLib.pdqUiName method has the following command format(s):
functionLib.pdqUiName(xpath);
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.
The functionLib.pickListActiveItem method has the following command format(s):
functionLib.pickListActiveItem(xpath);
functionLib.pickListActiveItem(xpath, row);
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).
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.
The functionLib.pickListClassName method has the following command format(s):
functionLib.pickListClassName(xpath);
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.
The functionLib.pickListCount method has the following command format(s):
functionLib.pickListCount(xpath);
functionLib.pickListCount(xpath, row);
a String specifying the object path.
an Integer specifying the row number from the List Applet (should always start from one) .
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.
The functionLib.pickListGetROProperty method has the following command format(s):
functionLib.pickListGetROProperty(xpath, propertyname);
functionLib.pickListGetROProperty(columnxpath, propertyname, row);
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).
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.
The functionLib.pickListIsEnabled method has the following command format(s):
functionLib.pickListIsEnabled(xpath);
functionLib.pickListIsEnabled(xpath, row);
a String specifying the object path.
an Integer specifying the row number from the List Applet (should always start from one).
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.
The functionLib.picklistItemIsExist method has the following command format(s):
functionLib.picklistItemIsExist(xpath, ItemName);
functionLib.picklistItemIsExist(xpath, ItemName, row);
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).
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.
The functionLib.pickListRepositoryName method has the following command format(s):
functionLib.pickListRepositoryName(xpath);
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.
The functionLib.pickListSetText method has the following command format(s):
functionLib.pickListSetText(xpath, value);
functionLib.pickListSetText(xpath, value, row);
a String specifying the object path.
a text to set in to the picklist object.
an Integer specifying the row.
Gets the un
attribute of the target HTML element defined by the xpath.
Common for both Form and List Applet objects.
The functionLib.pickListUIName method has the following command format(s):
functionLib.pickListUIName(xpath);
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).
The functionLib.rowCount method has the following command format(s):
functionLib.rowCount(xpath);
a String specifying the object path should be taken from the any column header from the List Applet.
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.
The functionLib.screenGetRoProperty method has the following command format(s):
functionLib.screenGetRoProperty(propertyName);
a String specifying the property (for example, un
, classname
, rn
) to get.
Clicks on the element inside the specified cell.
The functionLib.selectCell method has the following command format(s):
functionLib.selectCell(xpath, row);
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).
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.
The functionLib.SetCellData method has the following command format(s):
functionLib.SetCellData(xpath, row, value);
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.
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
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);
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.
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.
The functionLib.setTextArea method has the following command format(s):
functionLib.setTextArea(xpath, value, row);
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).
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.
The functionLib.siebScreenViewsIsExists method has the following command format(s):
functionLib.siebScreenViewsIsExists(RepositoryName, siebScreenViewsLevel);
a String specifying the object repository name.
a String specifying the level of the view for example, L2, L3 and L4.
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.
The functionLib.sitemapFilterTextIsExists method has the following command format(s):
functionLib.sitemapFilterTextIsExists( );
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.
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.
The functionLib.sitemapIsExists method has the following command format(s):
functionLib.sitemapIsExists( );
String true
if the search box field is present in the sitemap screen else returns false
if the sitemap screen does not exist.
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.
The functionLib.sitemapScreen2ndLevelViewCount method has the following command format(s):
functionLib.sitemapScreen2ndLevelViewCount(xpath);
a String specifying the xpath of the screen in the sitemap for which the number of second level views is to be retrieved.
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.
The functionLib.sitemapScreen3rdLevelViewCount method has the following command format(s):
functionLib.sitemapScreen3rdLevelViewCount(xpath);
a String specifying the xpath of the screen in the sitemap for which the number of third level views is to be retrieved.
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.
The functionLib.sitemapScreen4thLevelViewCount method has the following command format(s):
functionLib.sitemapScreen4thLevelViewCount(xpath);
a String specifying the xpath of the screen in the sitemap for which the number of fourth level views is to be retrieved.
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.
The functionLib.sitemapSearchBoxCount method has the following command format(s):
functionLib.sitemapSearchBoxCount( );
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.
The functionLib.sitemapSearchBoxIsExists method has the following command format(s):
functionLib.sitemapSearchBoxIsExists( );
String true
if the search box field is present in the sitemap screen else returns false
if the search box field is not present.
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.
The functionLib.sortDown method has the following command format(s):
functionLib.sortDown(xpath);
a String specifying the object path. Should be taken from the specified column header from the List Applet.
Sorts the table in ascending order based on the contents of the specified column.
The functionLib.sortUp method has the following command format(s):
functionLib.sortUp(xpath);
a String specifying the object path. Should be taken from the specified column header from the List Applet.
Gets the specified attribute (Property
) of the target HTML element defined by the path.
The functionLib.Static method has the following command format(s):
functionLib.Static(xpath);
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.
The functionLib.staticDialogGetROProperty method has the following command format(s):
functionLib.staticDialogGetROProperty(xpath);
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.
The functionLib.textAreaClassName method has the following command format(s):
functionLib.textAreaClassName(xpath);
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.
The functionLib.textAreaGetROProperty method has the following command format(s):
functionLib.textAreaGetROProperty(xpath, propertyname);
functionLib.textAreaGetROProperty(xpath, propertyname, row);
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).
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.
The functionLib.textareaIsEnabled method has the following command format(s):
functionLib.textareaIsEnabled(xpath);
functionLib.textareaIsEnabled(xpath, row);
a String specifying the object path.
an integer specifying the row number.
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.
The functionLib.textAreaRepositoryName method has the following command format(s):
functionLib.textAreaRepositoryName(xpath);
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.
The functionLib.textAreaText method has the following command format(s):
functionLib.textAreaText(xpath);
functionLib.textAreaText(xpath, row);
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).
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.
The functionLib.textAreaUiName method has the following command format(s):
functionLib.textAreaUiName(xpath);
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.
The functionLib.textGetROProperty method has the following command format(s):
functionLib.textGetROProperty(xpath, propertyname);
functionLib.textGetROProperty(xpath, propertyname, row);
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).
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.
The functionLib.textIsEnabled method has the following command format(s):
functionLib.textIsEnabled(xpath);
functionLib.textIsEnabled(xpath, row);
a String specifying the object path.
an Integer specifying the row number from the List Applet (should always start from one).
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.
The functionLib.textPopupType method has the following command format(s):
functionLib.textPopupType(xpath);
functionLib.textPopupType(xpath, row);
a String specifying the object path.
an integer specifying the row number from the List Applet (should always start from one).
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.
The functionLib.textRepositoryName method has the following command format(s):
functionLib.textRepositoryName(xpath);
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.
The functionLib.textText method has the following command format(s):
functionLib.textText(xpath);
functionLib.textText(xpath, row);
a String specifying the object path.
an Integer value specifying the row number from the List Applet (should always start from one).
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.
The functionLib.toolBarCount method has the following command format(s):
functionLib.toolBarCount( );
the number of objects of a given type that are present in the current context. The number of toolbar objects in the screen.
Detects whether a particular toolbar item is enabled on the target HTML element defined by the path.
The functionLib.toolbarItemIsEnabled method has the following command format(s):
functionLib.toolbarItemIsEnabled(xpath);
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.
The functionLib.viewAppletGetUiName method has the following command format(s):
functionLib.viewAppletGetUiName(AppRepName);
the UiName (display name in the user interface, i.e. the un
attribute) of the viewApplet object.
Detects whether the specified viewApplet object exists or not.
The functionLib.viewAppletIsExist method has the following command format(s):
functionLib.viewAppletIsExist(AppRepName);
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.
The functionLib.viewUiName method has the following command format(s):
functionLib.viewUiName( );
The name of the object as it appears in the user interface, i.e. UI Name, (un
attribute of the view object) of the current active view.
Gets the currently active visibility filter item name in the List Applet.
The functionLib.visibilityFilterActiveItem method has the following command format(s):
functionLib.visibilityFilterActiveItem( );
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.
The functionLib.webListGetItemByIndex method has the following command format(s):
functionLib.webListGetItemByIndex(xpath, index);
a String specifying the object path.
an integer specifying the object location.
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.
The functionLib.webListItemCount method has the following command format(s):
functionLib.webListItemCount(xpath);
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.
The functionLib.webListSelectItemByIndex method has the following command format(s):
functionLib.webListSelectItemByIndex(xpath, index);
a String specifying the object path.
an integer specifying the object location.
Selects the item in a web list for the specified Xpath and Value of the target HTML element.
The functionLib.webListSelectItemByValue method has the following command format(s):
functionLib.webListSelectItemByValue(xpath, Name);
a String specifying the object path.
a String specifying the object name.