20 Siebel OpenUI Function Library

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).

20.1 Using the Siebel OpenUI Function Library

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:

  1. Download the Siebel OpenUI function library zip file from:

    http://www.oracle.com/technetwork/oem/downloads/index-084446.html
    
  2. Unzip the Siebel OpenUI function library zip file into your OpenScript repository directory. For example: C:\OracleATS\OFT.

  3. Create a Web Functional test script for your Siebel OpenUI testing project.

  4. 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.

  5. 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.

20.2 Siebel OpenUI Function Library ENUM Reference

The following section provides an alphabetical listing of the enums in the OpenScript Siebel OpenUI Function Library API.

20.2.1 Alphabetical Enum Listing

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

CommunicationtoolbarGetROproprty

Gets the Communicationtoolbar ROproprty attributes classname, name, rn, un.

GetROPropertyApplet

Get the ROPropertyApplet attributes exist, rn, un.

GetROPropertyBtn

Get the ROPropertyBtn attributes classname, isenabled, rn, text, un.

GetROPropertyCheckbox

Get the ROPropertyCheckbox attributes isChecked, isEnabled, un, rn.

GetROPropertyImage

Get the ROPropertyImage attributes classname, isenabled, repositoryname, text, uiname.

GetROPropertyLink

Get the ROPropertyLink attributes text, uiname, repositoryname, classname, isenabled.

GetROPropertyPDQ

Get the ROPropertyPDQ attributes rn, text, un.

GetROPropertyScreen

Get the ROPropertyScreen attributes classname, rn, un, value.

GetROPropertyText

Gets the ROPropertyText attributes classname, isenabled, rn, text, un.

ViewGetROProperties

Gets the ViewGetROProperties attributes ActiveApplet, AppletCount, rn, un.

getROPropertyAdvancedEdit

Get the ROPropertyAdvancedEdit attributes classname, rn, un, value.

months

List of months in three-letter format Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec.

pagetabsGetROProperty

Get the pagetabs ROProperty attributes activeView, pageTabActiveScreen, screenCount, viewCount.

picklist_GetroProperty

Gets the picklist ROProperty attributes classname, rn, un, value.

siebScreenViewsValue

Sets the screen view level values L2, L3, L4.


20.3 Siebel Function Library API Reference

The following section provides an alphabetical listing of the methods in the OpenScript Siebel OpenUI Function Library API.

20.3.1 Alphabetical Command Listing

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

functionLib.ActiveTreeItem

Gets the active tree item in the specified Applet.

functionLib.ApplicationMenuClick

Performs click action on the Application Menu Links.

functionLib.Collapse

Collapses the object specified by String ID.

functionLib.CurrencyText

Gets the text value of the target HTML element defined by the xpath.

functionLib.DataLevel

Gets the level at which the Current row exists in the Hierarchial List Applet.

functionLib.DataParentId

Gets the parent ID of the Specified row in the Hierarchial List Applet.

functionLib.Drilldown

Drill down the specified object row of the List Applet.

functionLib.Expand

Expands the object specified by String ID.

functionLib.GetChildCount

Gets the child count of the object specified by String ID.

functionLib.GetTreeItemName

Gets the name of the tree item specified by String ID.

functionLib.Hcollapse

Collapses the specified row in the Hierarchial List Applet.

functionLib.Hexpand

Expands the specified row in the Hierarchial List Applet.

functionLib.IsSelected

Detects whether the object specified by String ID is selected or not.

functionLib.Login

Launches the browser and logs into the Application.

functionLib.Navigate_Screen

Navigates to the Screen/View from SiteMap.

functionLib.NextPage

Go to the next page of the specified Applet.

functionLib.Nextmonth

Gets the number of the next month.

functionLib.PreviousPage

Go to the previous page of the specified Applet.

functionLib.Previousmonth

Gets the number of the previous month.

functionLib.SetCellData

Sets the value of the input in the specified cell.

functionLib.SetText

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.

functionLib.Static

Gets the specified attribute (Property) of the target HTML element defined by the path.

functionLib.activateRow

Activates a row in the list.

functionLib.activeApplet

Gets the repository name of the current view.

functionLib.activeRow

Gets the active row number in the specified Applet.

functionLib.activeScreen

Gets the specified attribute (RepositoryName) of the activeScreen of the target HTML element defined by the path.

functionLib.activeView

Gets the specified attribute (RepositoryName) of the active view of the target HTML element defined by the path.

functionLib.advancededitGetRoProperty

Gets the property attribute of the target HTML element defined by the path.

functionLib.appletClassName

Gets the class attribute of the target HTML element.

functionLib.appletCount

Gets the Applet count under the current screen.

functionLib.appletGetROProperty

Gets the specified attribute (un, rn, exist) of the target HTML element defined by the path.

functionLib.appletRepositoryName

Gets the Repository Name of the active Applet.

functionLib.appletUiName

Gets the UI name of the active Applet.

functionLib.buttonClassName

Gets the class attribute of the target HTML element defined by the xpath.

functionLib.buttonGetRoProperty

Gets the specfied attribute (text, un, rn, classname, isenabled) of the target HTML element defined by the path.

functionLib.buttonIsEnabled

Gets the disabled attribute of the target HTML element defined by the xpath.

functionLib.buttonRepositoryName

Gets the rn attribute of the target HTML element defined by the xpath.

functionLib.buttonUIName

Gets the un attribute of the target HTML element defined by the xpath.

functionLib.buttonclick

Clicks on any button with specified repository name in the List or Form Applet.

functionLib.calculatorClassName

Gets the specified attribute (ClassName) of the target HTML element defined by the path.

functionLib.calculatorGetROProperty

Gets the specfied attribute (propertyname) of the target HTML element defined by the path.

functionLib.calculatorIsEnabled

Detects whether the calculator object is enabled or disabled.

functionLib.calculatorIsOpen

Detects whether the specified calculator popup is open or closed.

functionLib.calculatorRepositoryName

Gets the specified attribute (RepositoryName) of the target HTML element defined by the path.

functionLib.calculatorText

Gets the text value of the target HTML element defined by the xpath.

functionLib.calculatorUiName

Gets the specified attribute (UiName) of the target HTML element defined by the path.

functionLib.calendarDay

Gets the day value of the calendar object in the Form Applet.

functionLib.calendarDayClick

Clicks on the day link in the Calender object/popup in Form Applets.

functionLib.calendarDayListApplet

Gets the calendar day value in the List Applet.

functionLib.calendarIsOpen

Detects whether the specified calendar popup is open or closed.

functionLib.calendarMonth

Gets the month of the calendar object for the Form Applet.

functionLib.calendarMonthListApplet

Gets the calendar month value in the List Applet.

functionLib.calendarYear

Gets the year value of the Calendar object in the Form Applet.

functionLib.calendarYearListApplet

Gets the calendar year value in the List Applet.

functionLib.calenderClassName

Gets the classname attribute of the target HTML element defined by the path.

functionLib.calenderGetROProperty

Gets the specfied attribute (rn, un, classname, value) of the target HTML element defined by the path.

functionLib.calenderIsEnabled

Detects whether the calendar object is enabled or disabled.

functionLib.calenderUiName

Gets the rn attribute of the target HTML element defined by the xpath.

functionLib.checkBoxClassName

Gets the class attribute of the target HTML element defined by the xpath.

functionLib.checkBoxUIName

Gets the un attribute of the target HTML element defined by the xpath.

functionLib.checkboxGetROProperty

Gets the specified attribute(isChecked, isEnabled, un, rn) of the target HTML element defined by the path.

functionLib.checkboxRepositoryName

Gets the rn attribute of the target HTML element defined by the xpath.

functionLib.clickDone

Clicks the Done button in the Calender popup in List or Form Applets.

functionLib.clickNow

Clicks the Now button in the Calender popup in List or Form Applets.

functionLib.columnCount

Gets the number of currently visible columns in the list (determined by show more/less).

functionLib.commToolbarClassname

Gets the class attribute of the communication toolbar object from the target HTML element defined by the xpath.

functionLib.commToolbarGetRoProperty

Gets the property attribute of the target HTML element defined by the path.

functionLib.commToolbarIsEnabled

Detects whether or not the communication toolbar object is enabled from the target HTML element defined by the xpath.

functionLib.commToolbarRepositoryname

Gets the rn attribute of the communication toolbar object from the target HTML element defined by the xpath.

functionLib.commToolbarShowButtonToolTip

Gets the alt attribute (ToolTip) of the target HTML element defined by the xpath.

functionLib.commToolbarText

Gets the text value attribute of the communication toolbar object from the target HTML element defined by the xpath.

functionLib.commToolbarUiName

Gets the un attribute of the communication toolbar object from the target HTML element defined by the xpath.

functionLib.currencyAmount

Gets the Amount attribute of the target HTML element defined by the path.

functionLib.currencyClassName

Gets the class attribute of the target HTML element defined by the xpath.

functionLib.currencyCode

Returns the Currency Code value of the currency field in the List Applet.

functionLib.currencyCodeClassName

Gets the classname attribute of the target HTML element defined by the path.

functionLib.currencyCodeValue

Gets the Value attribute of the target HTML element defined by the path.

functionLib.currencyGetROProperty

Gets the specified attribute (rn, un, classname, value) of the target HTML element defined by the path.

functionLib.currencyIsEnabled

Detects whether the currency object is enabled or disabled.

functionLib.currencyIsOpen

Detects whether the specified Currency popup is open or closed.

functionLib.currencyRepositoryName

Gets the rn attribute of the target HTML element defined by the xpath.

functionLib.currencyUiName

Gets the un attribute of the target HTML element defined by the xpath.

functionLib.dialogGetROProperty

Gets the specified attribute (property) of the target HTML element defined by the path.

functionLib.extractId

Extracts and returns the ID attribute value of the given Xpath.

functionLib.focus

Sets focus to the target HTML element defined by the path.

functionLib.formRecordNumber

Gets the form record number.

functionLib.generateID

Generate the ID from the given row.

functionLib.getCellData

Gets the text for a specified cell when the cell has same repository name across multipal applets in same screen.

functionLib.getMonthNumber

Gets the number of the specified month.

functionLib.getNumberMonth

Gets the equivalent month for the corresponding number.

functionLib.getPageTabRepositoryName

Gets the rn attribute of the target HTML element defined by the xpath.

functionLib.getPageTabRepositoryNameByIndex

Gets the rn attribute of the target HTML element defined by the xpath using index.

functionLib.getUiName

Gets the un attribute or name of the object as it appears in the user interface of the target HTML element defined by the path.

functionLib.iconColor

Gets the color of the icon in the List Applet.

functionLib.imageGetRoProperty

Gets the property attribute of the target HTML element defined by the path.

functionLib.isCalculatorPopup

Detects whether pecified Calculator popup is opened or closed.

functionLib.isCalendarPopup

Detects whether the Calendar is opened or closed.

functionLib.isCheckboxChecked

Detects whether or not the specified checkbox object is checked for the List Applet.

functionLib.isCheckboxEnabled

Detects whether the specified checkbox object is enabled or disabled for the List Applet.

functionLib.isColumnExist

Detects wheather the specified column exist or not in the List Applet.

functionLib.isColumnwritable

Detects the the state of table column, where state is the value of the column's disabled or read-only property.

functionLib.isExpanded

Detects whether the object specified by String ID is expanded or not.

functionLib.isHierarchialListExpanded

Detects if the specified row is expanded or not in the Hierarchial List Applet.

functionLib.isPopupApplet

Detects whether or not the current Applet represents a popup Applet.

functionLib.isRequired

Detects whether the specified object is required or not.

functionLib.l2Count

Gets the specified number of views of the target HTML element defined by the path.

functionLib.linkGetRoProperty

Gets the propertyname attribute of the target HTML element defined by the path.

functionLib.log

Writes the specified message String to a results log file.

functionLib.make_uniq

Creates unique record by appending the date and time to the record passed as argument.

functionLib.menuCount

Gets the number of menu items from the Applet Level Menu object.

functionLib.menuItemClassName

Gets the classname attribute the target HTML element defined by the path.

functionLib.menuItemClick

Clicks and selects the item from the menu list.

functionLib.menuItemEnabled

Detects whether or not the specified menu object or menu item is enabled.

functionLib.menuItemExist

Detects whether or not the specified menu object or menu item exists.

functionLib.menuItemGetRepositoryName

Gets the rn attribute of the target HTML element defined by the xpath.

functionLib.menuItemGetUiName

Gets the un attribute of the target HTML element defined by the path.

functionLib.menuItemRepositoryName

Gets the rn attribute of the target HTML element defined by the xpath.

functionLib.monthMapping

Gets the equivalent month for the corresponding string value from the Document Object Model(DOM).

functionLib.notificationCount

Gets the notificationCount attribute of the target HTML element defined by the path.

functionLib.openCellElement

Clicks on the element inside the specified cell.

functionLib.openUiSync

Waits until classname siebui-busy is active.

functionLib.openpopup

Opens the pop up for the specified field in the List Applet.

functionLib.pageTabActiveScreen

Gets the rn attribute of the target HTML element defined by the xpath.

functionLib.pageTabIsExists

Detects whether or not the specified Pagetab object exists.

functionLib.pagetabsGetROProperty

Gets the specified attribute (pageTabActiveScreen, activeView, screenCount, viewCount) of the target HTML element defined by the path.

functionLib.pdqActive

Gets a data value representing the visible query title of the target HTML element defined by the xpath.

functionLib.pdqClassName

Gets the class name of the target HTML element defined by the path.

functionLib.pdqGetROProperty

Gets the specified attribute (Property) of the target HTML element defined by the path.

functionLib.pdqItemCount

Detects the number of objects of a given type that are present in the current context.

functionLib.pdqRepositoryName

Gets the rn attribute of the target HTML element defined by the xpath.

functionLib.pdqUiName

Gets the un attribute of the target HTML element defined by the xpath.

functionLib.pdqisExist

Detects whether or not the specified PDQ object exists.

functionLib.pickListActiveItem

Gets the value representing the currently selected item from the Picklist.

functionLib.pickListClassName

Gets the class attribute of the target HTML element defined by the xpath.

functionLib.pickListCount

Gets the number of items are present in the Picklist object for the List Applet.

functionLib.pickListGetROProperty

Gets the specfied attribute (rn, un, classname, value) of the target HTML element defined by the path.

functionLib.pickListIsEnabled

Detects whether the PickList object is enabled or disabled.

functionLib.pickListRepositoryName

Gets the rn attribute of the target HTML element defined by the xpath.

functionLib.pickListSetText

Set text to target Picklist element.

functionLib.pickListUIName

Gets the un attribute of the target HTML element defined by the xpath.

functionLib.picklistItemIsExist

Detects the existence of the Picklist item in the given LOV list.

functionLib.recordCount

Specifies the number of rows (visible/invisible) in the List Applet.

functionLib.rowCount

Gets the number of currently visible rows (determined by show more/less).

functionLib.screenClassName

Gets the classname attribute of the screen.

functionLib.screenCount

Gets the screen count present in the current context.

functionLib.screenGetRepositoryName

Gets the rn attribute of the target HTML element defined by the xpath.

functionLib.screenGetRoProperty

Gets the propertyname attribute of the target HTML element defined by the path.

functionLib.screenRepositoryName

Gets the rn attribute of the screen.

functionLib.screenUiName

Gets the un attribute of the screen.

functionLib.selectCell

Clicks on the element inside the specified cell.

functionLib.selectTree

Selects the tree object specified by String ID.

functionLib.setTextArea

Sets text to the specified cell (textarea) in the list.

functionLib.siebScreenActiveView

Gets the rn attribute of the target HTML element.

functionLib.siebScreenViewsIsExists

Detects whether the specified view exists or not.

functionLib.sitemapFilterTextIsExists

Detects whether or not the filtered count for the entered text is displayed on the sitemap screen on sitemap search operation.

functionLib.sitemapIsExists

Detects whether or not the sitemap screen is displayed on click of sitemap icon.

functionLib.sitemapLinkclick

Clicks on the link available on the Sitemap screen.

functionLib.sitemapScreen2ndLevelViewCount

Gets the number of 2nd level views present for a particular screen.

functionLib.sitemapScreen3rdLevelViewCount

Gets the number of 3rd level views present for a particular screen.

functionLib.sitemapScreen4thLevelViewCount

Gets the number of 4th level views present for a particular screen.

functionLib.sitemapSearchBoxCount

Gets the count of the number of occurrences of the specified text in the sitemap search box.

functionLib.sitemapSearchBoxIsExists

Detects whether or not the searchbox field exists in the sitemap screen.

functionLib.sortDown

Sorts the table in descending order based on the contents of the specified column.

functionLib.sortUp

Sorts the table in ascending order based on the contents of the specified column.

functionLib.staticDialogGetROProperty

Gets the specified attribute (Property) of the target HTML element defined by the path.

functionLib.staticDialogGetVisibleText

Gets the text attribute of the Confirm or Alert dialog box, if one exists.

functionLib.textAreaClassName

Gets the class attribute of the target HTML element defined by the xpath.

functionLib.textAreaGetROProperty

Gets the specfied attribute (rn, un, classname, value) of the target HTML element defined by the path.

functionLib.textAreaRepositoryName

Gets the rn attribute of the target HTML element defined by the xpath.

functionLib.textAreaText

Gets the text value of the target HTML element defined by the xpath.

functionLib.textAreaUiName

Gets the un attribute of the target HTML element defined by the xpath.

functionLib.textClassName

Gets the class attribute of the target HTML element defined by the xpath.

functionLib.textGetROProperty

Gets the specfied attribute (text, un, rn, classname, isenabled) of the target HTML element defined by the path.

functionLib.textIsEnabled

Detects whether the Text object is enabled or disabled from the target HTML element defined by the xpath.

functionLib.textPopupType

Detects the type of popup associated with the textbox from the target HTML element defined by the xpath.

functionLib.textRepositoryName

Gets the rn attribute of the Text object of the target HTML element defined by the xpath.

functionLib.textText

Gets the text value of the target HTML element defined by the xpath.

functionLib.textUIName

Gets the un attribute of the Text object of the target HTML element defined by the xpath.

functionLib.textareaIsEnabled

Detects whether the Textarea object is enabled or disabled.

functionLib.threadBarItemCount

Gets the number of objects of a given type that are present in the current context.

functionLib.threadItems

Gets the threaditems attribute of the target HTML element defined by the path.

functionLib.toggleClick

Clicks on any span with repository name in the List or Form Applet.

functionLib.toolBarCount

Gets the count attribute of the target HTML element defined by the path.

functionLib.toolbarClassName

Gets the specified attribute (classname) of the target HTML element defined by the path.

functionLib.toolbarItemIsEnabled

Detects whether a particular toolbar item is enabled on the target HTML element defined by the path.

functionLib.viewAppletActiveApplet

Gets the activeapplet attribute of the Applet view object.

functionLib.viewAppletCount

Gets the appletcount attribute of the target HTML element defined by the path.

functionLib.viewAppletGetRepositoryName

Gets the specified attribute (RepositoryName) of the target HTML element defined by the path.

functionLib.viewAppletGetUiName

Gets the uiname attribute of the target HTML element defined by the path.

functionLib.viewAppletIsExist

Detects whether the specified viewApplet object exists or not.

functionLib.viewAppletSelect

Gets the specified attribute (Applet repository name) of the target HTML element defined by the path.

functionLib.viewCount

Gets the number of view objects present in the current context for Second level view bar.

functionLib.viewGetROProperty

Gets the specified attribute (PropertyName) of the target HTML element defined by the path.

functionLib.viewRepositoryName

Gets the rn attribute of the target HTML element.

functionLib.viewUiName

Gets the specified attribute (UI Name) of the target HTML element defined by the path.

functionLib.visibilityFilterActiveItem

Gets the currently active visibility filter item name in the List Applet.

functionLib.waitDomToLoad

Waits until the Document Object Model (DOM) of the page gets loaded.

functionLib.webListGetItemByIndex

Gets the specified attribute (Item) of the target HTML element defined by the path.

functionLib.webListItemCount

Gets the Itemcount attribute of the target HTML element defined by the path.

functionLib.webListSelectItemByIndex

Selects the specified Item in a web list for the given Xpath and index of the target HTML element.

functionLib.webListSelectItemByValue

Selects the item in a web list for the specified Xpath and Value of the target HTML element.


The following sections provide detailed reference information for each method and enum in the Siebel Function Library Class of Siebel Function Library Application Programming Interface.

functionLib.activateRow

Activates a row in the list.

Format

The functionLib.activateRow method has the following command format(s):

functionLib.activateRow(xpath, row);

Command Parameters

xpath

a String specifying the object path. Should be taken from any column header from the List Applet.

row

an Integer specifying the row number from the List Applet (should always start from one).

Throws

Exception

on any error.

Example

Activates the fifth row in the list.

functionLib.activateRow("/web:window" +
 "/web:document" +
 "/web:div[@rn='Name' and @ot='JText' " +
  "and @un='Name']", 5);

functionLib.activeApplet

Gets the repository name of the current view.

Format

The functionLib.activeApplet method has the following command format(s):

functionLib.activeApplet( );

Throws

Exception

on any error.

Returns

a String repository name of the current context.

Example

Gets the repository name of the current view and prints the custom message.

//Using Java variable.
String value = functionLib.activeApplet();
System.out.println("active Applet is "+ value);

functionLib.activeRow

Gets the active row number in the specified Applet.

Format

The functionLib.activeRow method has the following command format(s):

functionLib.activeRow(AppletRepname);

Command Parameters

AppletRepname

a String specifying the Applet.

Throws

Exception

on any error.

Returns

an Integer row number.

Example

Gets the active row number.

//Using Java variable.
int activeRow = functionLib.activeRow("Applet Name");
System.out.println("The active row is "+activeRow);

functionLib.activeScreen

Gets the specified attribute (RepositoryName) of the activeScreen of the target HTML element defined by the path.

Format

The functionLib.activeScreen method has the following command format(s):

functionLib.activeScreen( );

Throws

Exception

on any error.

Returns

the RepositoryName (un SiebelPageTab object attribute) of the activeScreen, as represented by the active Aggregate Category link.

Example

Gets the RepositoryName (un SiebelPageTab object attribute) of the activeScreen, as represented by the active Aggregate Category link and prints the custom message.

//Using Java variable.
String value = functionLib.activeScreen();
System.out.println("activeScreen is "+value);

functionLib.ActiveTreeItem

Gets the active tree item in the specified Applet.

Format

The functionLib.ActiveTreeItem method has the following command format(s):

functionLib.ActiveTreeItem(AppletRepname);

Command Parameters

AppletRepname

a String specifying the Applet.

Throws

Exception

on any error.

Returns

a String of the active item name.

Example

Gets the active tree item.

//Using Java variable.
String activeitem = functionLib.ActiveTreeItem("Applet Name");
System.out.println("The active tree item is "+activeitem);

functionLib.activeView

Gets the specified attribute (RepositoryName) of the active view of the target HTML element defined by the path.

Format

The functionLib.activeView method has the following command format(s):

functionLib.activeView( );

Throws

Exception

on any error.

Returns

the RepositoryName (rn attribute) of the active view, as represented by the active Aggregate Category link.

Example

Gets the RepositoryName (rn attribute) of the active view, as represented by the active Aggregate Category link and prints the custom message.

//Using Java variable.
String value = functionLib.activeView();
System.out.println("Active View is "+value);

functionLib.advancededitGetRoProperty

Gets the property attribute of the target HTML element defined by the path.

Format

The functionLib.advancededitGetRoProperty method has the following command format(s):

functionLib.advancededitGetRoProperty(propertyName, xpath);

Command Parameters

propertyName

a String specifying the property (for example, classname, rn, un, value) to get.

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

the String value of the specified property.

Example

Gets the value of the advancededit element with the attribute value and prints the custom message.

//Using Java variable.
String value = functionLib.advancededitGetRoProperty("value","/web:window[]" +
 "/web:document[]" +
 "/web:form[]" +
 "/web:input_text[@rn='Revenue' and @ot='JCurrencyCalc' " +
  "and @un='Revenue']");
System.out.println("AdvancedEdit value is "+value);

functionLib.appletClassName

Gets the class attribute of the target HTML element.

Format

The functionLib.appletClassName method has the following command format(s):

functionLib.appletClassName(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

a String specifying the class property of the Applet object.

Example

Gets the class attribute and prints the custom message.

//Using Java variable.
String value = functionLib.appletClassName("");
System.out.println("Class Name is "+value);

functionLib.appletCount

Gets the Applet count under the current screen.

Format

The functionLib.appletCount method has the following command format(s):

functionLib.appletCount( );

Throws

Exception

on any error.

Returns

the number of Applets in the current screen.

Example

Gets the number of Applets under the current screen and prints the custom message.

//Using Java variable.
int value = functionLib.appletCount();
System.out.println("Applet count is "+value);

functionLib.appletGetROProperty

Gets the specified attribute (un, rn, exist) of the target HTML element defined by the path.

Format

The functionLib.appletGetROProperty method has the following command format(s):

functionLib.appletGetROProperty(propertyName);

Command Parameters

propertyName

a String specifying the property (For example, un, rn, exist) to get.

Throws

Exception

on any error.

Returns

the String value of the specified property.

Example

Gets the repository name (rn) of the Applet object and prints the custom message if matches the expected value.

//Using Java variable.
String repName = functionLib.appletGetROProperty("rn");
if(repName.equals("Visible Contact List View"))
{
 System.out.println("Pass");
}
else
{
 System.out.println("Fail");
}

functionLib.appletRepositoryName

Gets the Repository Name of the active Applet.

Format

The functionLib.appletRepositoryName method has the following command format(s):

functionLib.appletRepositoryName( );

Throws

Exception

on any error.

Returns

a String Repository name of the active Applet.

Example

Gets the Repository name of the active Applet and prints the custom message.

//Using Java variable.
String getAttribute = functionLib.appletRepositoryName();
if (getAttribute.equals("Visible Contact List View")) 
{
 System.out.println("Pass");
}
else
{
 System.out.println("Fail");
}

functionLib.appletUiName

Gets the UI name of the active Applet.

Format

The functionLib.appletUiName method has the following command format(s):

functionLib.appletUiName( );

Throws

Exception

on any error.

Returns

a String value of the rn property.

Example

Gets the Applet UI name and prints the custom message.

// Using Java variable.
String appName = functionLib.appletUiName();
if(appName.equals("SIS Account List Applet"))
{
 System.out.println("Pass");
}
else
{
 System.out.println("Fail");
}

functionLib.ApplicationMenuClick

Performs click action on the Application Menu Links.

Format

The functionLib.ApplicationMenuClick method has the following command format(s):

functionLib.ApplicationMenuClick(unLIAppMenuItem, unLIAppSubmenuItem);

Command Parameters

unLIAppMenuItem

a String specifying the UN attribute of the Main menu Link. For example, File, Edit, View, etc.

unLIAppSubmenuItem

a String specifying the UN attribute of the Link which is present inside the main menu item. For example, Logout, Action Pane, etc.

Throws

Exception

on any error.

Example

Performs click action on the Application Menu Links.

functionLib.ApplicationMenuClick("File", "File - Logout");

functionLib.buttonClassName

Gets the class attribute of the target HTML element defined by the xpath.

Format

The functionLib.buttonClassName method has the following command format(s):

functionLib.buttonClassName(xpath);

Command Parameters

xpath

a String specifying the object xpath.

Throws

Exception

on any error.

Returns

a String class name of the object button.

Example

Gets the attribute class for the element button and prints the custom message.

//Using Java variable.
String classname = functionLib.buttonClassName("/web:window" +
 "/web:document" +
 "/web:form" +
 "/web:button[@rn='NewRecord' and @ot='Button' and @un='New']");
System.out.println(classname);

functionLib.buttonclick

Clicks on any button with specified repository name in the List or Form Applet.

Format

The functionLib.buttonclick method has the following command format(s):

functionLib.buttonclick(rn, ListORForm);

Command Parameters

rn

Repository name of teh button.

ListORForm

Specify List or Form.

Throws

Exception

on any error.

Example

Clicks on the button based on the specified Form Applet.

functionLib.buttonclick("NewQuery", "Form");

functionLib.buttonGetRoProperty

Gets the specfied attribute (text, un, rn, classname, isenabled) of the target HTML element defined by the path.

Format

The functionLib.buttonGetRoProperty method has the following command format(s):

functionLib.buttonGetRoProperty(xpath, propertyName);

Command Parameters

xpath

a String specifying the object xpath.

propertyName

a String specifying the property (For example, text, un, rn, classname, isenabled) to get.

Throws

Exception

on any error.

Returns

the String value of the specified property.

Example

Gets the value of the button element with the attribute text and prints the custom message.

//Using Java variable.
String getAttribute = functionLib.buttonGetRoProperty("/web:window" +
 "/web:document" +
 "/web:form" +
 "/web:button[@rn='NewRecord' and @ot='Button' and @un='New']", "text");
//Using If condition comparing with expected.
if (getAttribute.equals("New")) 
{
 System.out.println("Pass");
}
else
{
 System.out.println("Fail");
}

functionLib.buttonIsEnabled

Gets the disabled attribute of the target HTML element defined by the xpath.

Format

The functionLib.buttonIsEnabled method has the following command format(s):

functionLib.buttonIsEnabled(xpath);

Command Parameters

xpath

a String specifying the object xpath.

Throws

Exception

on any error.

Returns

true if the object is enabled, false if the object is disabled.

Example

Detect whether or not the button is enabled and prints the custom message if enable/disabled.

//Using Java variable.
boolean enabled = functionLib.buttonIsEnabled("/web:window" +
 "/web:document" +
 "/web:form" +
 "/web:button[@rn='NewRecord' and @ot='Button' and @un='New']");
if(enabled)
{
 System.out.println("button is enabled");
}
else
 System.out.println("button is not enabled");

functionLib.buttonRepositoryName

Gets the rn attribute of the target HTML element defined by the xpath.

Format

The functionLib.buttonRepositoryName method has the following command format(s):

functionLib.buttonRepositoryName(xpath);

Command Parameters

xpath

a String specifying the object xpath.

Throws

Exception

on any error.

Returns

a String repository name of the object button.

Example

Gets the rn attribute of the target xpath and prints the custom message.

//Using Java variable.
String repoName = functionLib.buttonRepositoryName("/web:window" +
 "/web:document" +
 "/web:form" +
 "/web:button[@rn='NewRecord' and @ot='Button' and @un='New']");
if(repoName.equals("New"))
{
 System.out.println("Pass");
}
else
{
 System.out.println("Fail");
}

functionLib.buttonUIName

Gets the un attribute of the target HTML element defined by the xpath.

Format

The functionLib.buttonUIName method has the following command format(s):

functionLib.buttonUIName(xpath);

Command Parameters

xpath

a String specifying the object xpath.

Throws

Exception

on any error.

Returns

a String UIname of the object button.

Example

Gets the attribute un for the element button and prints the custom message.

//Using Java variable.
String UIName = functionLib.buttonUIName("/web:window" +
 "/web:document" +
 "/web:form" +
 "/web:button[@rn='NewRecord' and @ot='Button' and @un='New']");
if(UIName.equals("New"))
{
 System.out.println("Pass");
}
else
{
 System.out.println("Fail");
}

functionLib.calculatorClassName

Gets the specified attribute (ClassName) of the target HTML element defined by the path.

This Function is common for both List and Form Applets.

Format

The functionLib.calculatorClassName method has the following command format(s):

functionLib.calculatorClassName(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

the classname of the calculator object

Example

Gets the classname of the calculator object element and prints the custom message.

//Using Java variable.
String value = functionLib.calculatorClassName("/web:window" +
 "/web:document" +
 "/web:form[@name='SWEForm1_0' ]" +
 "/web:input_text[@rn='Current Volume' and @ot='JCurrencyCalc' " +
   "and @un='Current Volume']"); 
System.out.println("Calculator classname is"+value);

functionLib.calculatorGetROProperty

Gets the specfied attribute (propertyname) of the target HTML element defined by the path.

This function should be used only for List Applet objects.

Format

The functionLib.calculatorGetROProperty method has the following command format(s):

functionLib.calculatorGetROProperty(xpath, propertyname);

functionLib.calculatorGetROProperty(xpath, propertyname, row);

Command Parameters

xpath

a String specifying the object path.

propertyname

the property name to get.

row

an Integer specifying the row number from the List Applet (should always start from one).

Throws

Exception

on any error.

Returns

a String value of the specified property.

Example

Gets the value of the calculator element with the attribute value and prints the custom message if matches the required value.

//Using Java variable.
String getAttribute2 = functionLib.calculatorGetROProperty("/web:window" +
 "/web:document" +
 "/web:div[@rn='NRC Total' and @ot='JCurrencyCalc' " +
  "and @un='NRC Total']", "value", 2 );      
if(getAttribute2.equals(""))
{
 System.out.println("Pass");
}
else
{
 System.out.println("Fail");
}

functionLib.calculatorIsEnabled

Detects whether the calculator object is enabled or disabled.

This function should be used only for Form Applets.

Format

The functionLib.calculatorIsEnabled method has the following command format(s):

functionLib.calculatorIsEnabled(xpath);

functionLib.calculatorIsEnabled(xpath, row);

Command Parameters

xpath

a String specifying the object path should be taken from the specified column header from the List Applet..

row

an Integer specifying the row number from the List Applet (should always start from one).

Throws

Exception

on any error.

Returns

true if the object is enabled, false if the object is disabled.

Example

Detects whether the calculator object is enabled or disabled and prints a custom message based on whether calculator object is enabled or disabled.

//Using Java variable.
boolean cal = functionLib.calculatorIsEnabled("/web:window" +
 "/web:document" +
 "/web:div[@rn='NRC Total' and @ot='JCurrencyCalc' " +
  "and @un='NRC Total']",5);
if(cal)
{
 System.out.println("Enabled");
}
else
{
 System.out.println("Disabled");
} 

functionLib.calculatorIsOpen

Detects whether the specified calculator popup is open or closed.

Format

The functionLib.calculatorIsOpen method has the following command format(s):

functionLib.calculatorIsOpen(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

String true if the calculator popup is opened, false if the calculator popup is closed.

Example

Detect whether the calculator popup is open or closed and prints a custom message.

//Using Java variable.
String value = functionLib.calculatorIsOpen("/web:window[]" +
 "/web:document[]" +
 "/web:input_text[@id='s_0_1_313_0']");
if(value.equals("true"))
{
 System.out.println("calculator popup is Opened");
}
else
{
 System.out.println("calculator popup is Closed"); 
}

functionLib.calculatorRepositoryName

Gets the specified attribute (RepositoryName) of the target HTML element defined by the path.

This Function is common for both List and Form Applets.

Format

The functionLib.calculatorRepositoryName method has the following command format(s):

functionLib.calculatorRepositoryName(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

the repository name of the calculator object.

Example

Gets the RepositoryName attribute of the calculator object element and prints the custom message.

//Using Java variable.
String value = functionLib.calculatorRepositoryName("/web:window[]" +
 "/web:document[]" +
 "/web:form[@name='SWEForm1_0' ]" +
 "/web:input_text[@rn='Current Volume' and @ot='JCurrencyCalc' " +
  "and @un='Current Volume']"); 
System.out.println("Calculator RepositoryName is "+value);

functionLib.calculatorText

Gets the text value of the target HTML element defined by the xpath.

This Function should be used only for List Applets.

Format

The functionLib.calculatorText method has the following command format(s):

functionLib.calculatorText(xpath);

functionLib.calculatorText(xpath, row);

Command Parameters

xpath

a String specifying the object path.

row

an Integer value specifying the row number from the List Applet (should always start from one).

Throws

Exception

on any error.

Returns

a String value specifying the text of the object.

Example

Gets the text value from the object for the second row of the List Applet and prints the custom message.

//Using Java variable.
String value = functionLib.calculatorText("/web:window" +
 "/web:document" +
 "/web:div[@rn='NRC Total' and @ot='JCurrencyCalc' " +
  "and @un='NRC Total']", 2); 
if(value.equals("$1,222.00"))
{
 System.out.println("Pass");
}
else
{
 System.out.println("Fail");
}

functionLib.calculatorUiName

Gets the specified attribute (UiName) of the target HTML element defined by the path.

This Function will be common for both List and Form Applets.

Format

The functionLib.calculatorUiName method has the following command format(s):

functionLib.calculatorUiName(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

the UI of the calculator object.

Example

Gets the UiName of the calculator object element and prints the custom message.

//Using Java variable.
String value = functionLib.calculatorUiName("/web:window" +
 "/web:form[@name='SWEForm1_0']" +
 "/web:input_text[@rn='NetTotal' and @ot='JCalculator' " +
  "and @un='Quote Total']"); 
System.out.println("Calculator UiName is "+value);

functionLib.calendarDay

Gets the day value of the calendar object in the Form Applet.

Format

The functionLib.calendarDay method has the following command format(s):

functionLib.calendarDay(xpath);

functionLib.calendarDay(xpath, row);

Command Parameters

xpath

a String specifying the object path should be taken from the specified column header of the List Applet..

row

an Integer specifying the row number from the List Applet (should always start from one).

Throws

Exception

on any error.

Returns

String value of sepcifying the day of the calendar object.

Example

Gets the day of the calendar object for the List Applet and prints the custom message.

//Using Java variable.
String day = functionLib.calendarDay("/web:window" +
 "/web:document" +
 "/web:div[@rn='Start Date' and @ot='JDatePick' " +
  "and @un='Effective As Of']", 5);
System.out.println("Day is "+day);

functionLib.calendarDayClick

Clicks on the day link in the Calender object/popup in Form Applets.

The Calendar popup should be open before clicking on any day.

Format

The functionLib.calendarDayClick method has the following command format(s):

functionLib.calendarDayClick(xpath, day);

functionLib.calendarDayClick(xpath, row, day);

Command Parameters

xpath

a String specifying the object path should be taken from the specified column header of the List Applet.

row

an integer specifying the row number from the List Applet (should always start from one).

day

String specifying a day to click on the calendar popup.

Throws

Exception

on any error.

Example

Clicks a day on the calendar popup in the List Applet.

//Using Java variable.
String ispopup = functionLib.isCalendarPopup();
if(ispopup.equals("true"))
{
 System.out.println("calendar is popup");
 functionLib.calendarDayClick("/web:window" +
  "/web:document" +
  "/web:div[(@rn='Primary Revenue Close Date' " +
   "and @ot='JDatePick') or @un='Close Date']", 1, "12");
}
else
{
 System.out.println("calendar is not popup"); 
}
 

functionLib.calendarDayListApplet

Gets the calendar day value in the List Applet.

Format

The functionLib.calendarDayListApplet method has the following command format(s):

functionLib.calendarDayListApplet(xpath, row);

Command Parameters

xpath

a String specifying the object path should be taken from the specified column header from the List Applet.

row

an Integer specifying the row of the record in the List Applet for which the calendar day value is to be retrieved.

Throws

Exception

on any error.

Returns

a String day value.

Example

Gets the calendar day value.

//Using Java variable.
String dayvalue = functionLib.calendarDayListApplet("/web:window[]" +
 "/web:document[]" +
 "/web:input_text[@id='s_0_1_313_0']", 2);
System.out.println("Day value is "+dayvalue);

functionLib.calendarIsOpen

Detects whether the specified calendar popup is open or closed.

Format

The functionLib.calendarIsOpen method has the following command format(s):

functionLib.calendarIsOpen(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

String true if the calendar popup is open, false if the calendar popup is closed.

Example

Detect whether calendar popup is open or closed and prints a custom message.

//Using Java variable.
String value = functionLib.calendarIsOpen("/web:window[]" +
 "/web:document[]" +
 "/web:input_text[@id='s_0_1_313_0']");
if(value.equals("true"))
{
 System.out.println("calendar popup is Opened");
}
else
{
 System.out.println("calendar popup is Closed"); 
}

functionLib.calendarMonth

Gets the month of the calendar object for the Form Applet.

Format

The functionLib.calendarMonth method has the following command format(s):

functionLib.calendarMonth(xpath);

functionLib.calendarMonth(xpath, row);

Command Parameters

xpath

a String specifying the object path should be taken from the specified column header from the List Applet.

row

an Integer specifying the row number from the List Applet (should always start from one).

Throws

Exception

on any error.

Returns

a String value sepcifying the month of the calendar object (Output: Jan, Feb, etc.).

Example

Gets the month of the calendar object for the List Applet and prints the custom message.

//Using Java variable.
String month = functionLib.calendarMonth("/web:window" +
 "/web:document" +
 "/web:div[@rn='Start Date' and @ot='JDatePick' " +
  "and @un='Effective As Of']", 5);
System.out.println("Month is "+month);

functionLib.calendarMonthListApplet

Gets the calendar month value in the List Applet.

Format

The functionLib.calendarMonthListApplet method has the following command format(s):

functionLib.calendarMonthListApplet(xpath, row);

Command Parameters

xpath

a String specifying the object path should be taken from the specified column header from the List Applet.

row

an Integer specifying the row of the record in the List Applet for which the calendar month value is to be retrieved.

Throws

Exception

on any error.

Returns

a String month value.

Example

Gets the calendar month value.

//Using Java variable.
String monthvalue = functionLib.calendarMonthListApplet("/web:window[]" +
 "/web:document[]" +
 "/web:input_text[@id='s_0_1_313_0']", 2);
System.out.println("Month value is "+monthvalue);

functionLib.calendarYear

Gets the year value of the Calendar object in the Form Applet.

Format

The functionLib.calendarYear method has the following command format(s):

functionLib.calendarYear(xpath);

functionLib.calendarYear(xpath, row);

Command Parameters

xpath

a String specifying the object path should be taken from the specified column header of the List Applet..

row

an Integer specifying the row number from the List Applet (should always start from one).

Throws

Exception

on any error.

Returns

string year value of the calendar field in the Form Applet.

Example

Gets the year of the calendar object for the fifth row in the List Applet and prints the custom message.

//Using Java variable.
String year = functionLib.calendarYear("/web:window" +
 "/web:document" +
 "/web:div[@rn='Start Date' and @ot='JDatePick' " +
  "and @un='Effective As Of']", 5);
System.out.println("year is "+year);

functionLib.calendarYearListApplet

Gets the calendar year value in the List Applet.

Format

The functionLib.calendarYearListApplet method has the following command format(s):

functionLib.calendarYearListApplet(xpath, row);

Command Parameters

xpath

a String specifying the object path should be taken from the specified column header from the List Applet.

row

an Integer specifying the row of the record in the List Applet for which the calendar year value is to be retrieved.

Throws

Exception

on any error.

Returns

a String year value.

Example

Gets the calendar year value.

//Using Java variable.
String yearvalue = functionLib.calendarYearListApplet("/web:window[]" +
 "/web:document[]" +
 "/web:input_text[@id='s_0_1_313_0']", 2);
System.out.println("Year value is "+yearvalue);

functionLib.calenderClassName

Gets the classname attribute of the target HTML element defined by the path.

Format

The functionLib.calenderClassName method has the following command format(s):

functionLib.calenderClassName(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

a String class specified calendar object.

Example

Gets the classname attribute of the calendar object and prints the custom message.

//Using Java variable.
String classname = functionLib.calenderClassName("/web:window" +
 "/web:document" +
 "/web:input_text[@rn='CloseDate2' and @ot='JDatePick' " +
  "and @un='Close Date']");
System.out.println("calendar classname is "+classname);

functionLib.calenderGetROProperty

Gets the specfied attribute (rn, un, classname, value) of the target HTML element defined by the path.

This function should be used only for Form Applet objects.

Format

The functionLib.calenderGetROProperty method has the following command format(s):

functionLib.calenderGetROProperty(xpath, propertyname);

functionLib.calenderGetROProperty(xpath, propertyname, row);

Command Parameters

xpath

a String specifying the object path should be taken from the specified column header from the List Applet.

propertyname

a String specifying the property (for example, rn, un, classname, value) to get.

row

an Integer specifying the row number from the List Applet (should always start from one).

Throws

Exception

on any error.

Returns

a String value of the specified property.

Example

Gets the value of the calender element with the attribute value and prints the custom message if matches the required value.

//Using Java variable.
String getAttribute = functionLib.calenderGetROProperty("/web:window" +
 "/web:document" +
 "/web:div[@rn='Primary Revenue Close Date' " +
 "and @ot='JDatePick' and @un='Close Date']", "value", 2 );   
if(getAttribute.equals("9/7/2013"))
{
 System.out.println("Pass");
}
else
{
 System.out.println("Fail");
}

functionLib.calenderIsEnabled

Detects whether the calendar object is enabled or disabled.

This function should be used only for List Applets.

Format

The functionLib.calenderIsEnabled method has the following command format(s):

functionLib.calenderIsEnabled(xpath);

functionLib.calenderIsEnabled(xpath, row);

Command Parameters

xpath

a String specifying the object path.

row

an Integer specifying the row number from the List Applet (should always start from one).

Throws

Exception

on any error.

Returns

true if the object is enabled, false if the object is disabled.

Example

Detects whether the calendar object is enabled or disabled and prints a custom message.

//Using Java variable.
boolean pklst2 = functionLib.calenderIsEnabled("/web:window" +
 "/web:document" +
 "/web:input_text[@rn='CloseDate2' and @ot='JDatePick' " +
  "and @un='Close Date']", 5);
if(pklst2)
{
 System.out.println("Enabled");
}
else
{
 System.out.println("Disabled");
}

functionLib.calenderUiName

Gets the rn attribute of the target HTML element defined by the xpath.

This Function should be used for both List and Form Applets.

Format

The functionLib.calenderUiName method has the following command format(s):

functionLib.calenderUiName(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

a String repository name of the calendar object.

Example

Gets the repository name of the calendar object and prints the custom message.

//Using Java variable.
String value = functionLib.calenderUiName("/web:window" +
 "/web:document" +
 "/web:input_text[@rn='CloseDate2' and @ot='JDatePick' " +
 "and @un='Close Date']");
System.out.println("calendar UI name is "+value);

functionLib.checkBoxClassName

Gets the class attribute of the target HTML element defined by the xpath.

Common for both Form and List Applet objects.

Format

The functionLib.checkBoxClassName method has the following command format(s):

functionLib.checkBoxClassName(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

a String of class name of the checkbox object.

Example

Gets the class attribute of the currency object and prints the custom message.

//Using Java variable.
String chkbox = functionLib.checkBoxClassName("/web:window" +
 "/web:document" +
 "/web:form[@name='SWEForm1_0']" +
 "/web:input_checkbox[@rn='Active' and @ot='JCheckBox' " +
  "and @un='Active']");
 System.out.println("Check box class name "+ chkbox); 

functionLib.checkboxGetROProperty

Gets the specified attribute(isChecked, isEnabled, un, rn) of the target HTML element defined by the path.

This function should be used only for List Applets.

Format

The functionLib.checkboxGetROProperty method has the following command format(s):

functionLib.checkboxGetROProperty(xpath, propertyName);

functionLib.checkboxGetROProperty(xpath, propertyName, row);

Command Parameters

xpath

a String specifying the object path.

propertyName
row

an Integer specifying the row number from the List Applet (should always start from one).

Throws

Exception

on any error.

Returns

a String value of the specified property.

Example

Gets the UI Name of the checkbox element with the attribute un and prints the custom message if matches the required value.

//Using Java variable.
String getAttribute = functionLib.checkboxGetROProperty("/web:window" +
 "/web:document" +
 "/web:input_checkbox[@rn='Secure2' and @ot='JCheckBox' " +
  "and @un='Secure']", "un", 2);     
if(getAttribute.equals("Secure"))
{
 System.out.println("Pass");
}
else
{
 System.out.println("Fail");
}

functionLib.checkboxRepositoryName

Gets the rn attribute of the target HTML element defined by the xpath.

Common for both Form and List Applet objects.

Format

The functionLib.checkboxRepositoryName method has the following command format(s):

functionLib.checkboxRepositoryName(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

a String repository name of the pagetab object.

Example

Gets the repository name of the checkbox object and prints the custom message.

//Using Java variable.
String chkbox = functionLib.checkboxRepositoryName("/web:window" +
 "/web:document" +
 "/web:form[@name='SWEForm1_0']" +
 "/web:input_checkbox[@rn='Active' and @ot='JCheckBox' " +
 "and @un='Active']");
System.out.println("Check box Repository name "+ chkbox);

functionLib.checkBoxUIName

Gets the un attribute of the target HTML element defined by the xpath.

Common for both Form and List Applet objects.

Format

The functionLib.checkBoxUIName method has the following command format(s):

functionLib.checkBoxUIName(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

a String of the specified UiMame of the checkbox object.

Example

Gets the UiName of the currency object and prints the custom message.

//Using Java variable.
String chkbox = functionLib.checkBoxUIName("/web:window" +
 "/web:document" +
 "/web:form[@name='SWEForm1_0']" +
 "/web:input_checkbox[@rn='Active' and @ot='JCheckBox' " +
  "and @un='Active']");
 System.out.println("Check box UI Name"+ chkbox); 

functionLib.clickDone

Clicks the Done button in the Calender popup in List or Form Applets.

The Calendar popup should be open before clicking the Done button.

Format

The functionLib.clickDone method has the following command format(s):

functionLib.clickDone( );

Throws

Exception

on any error.

Example

Clicks the Done button in the calendar popup when the calendar is opened in List or Form Applets.

//Using Java variable.
String isCalOpen = functionLib.isCalendarPopup();
if(isCalOpen.equals("true"))
{
 System.out.println("calendar is popup");
 functionLib.clickDone();
}
else
{
 System.out.println("calendar is not popup"); 
}
 

functionLib.clickNow

Clicks the Now button in the Calender popup in List or Form Applets.

The Calendar popup should be open before clicking the Now button.

Format

The functionLib.clickNow method has the following command format(s):

functionLib.clickNow( );

Throws

Exception

on any error.

Example

Clicks the Now button in the calendar popup when the calendar is opened in List or Form Applets.

//Using Java variable.
String isCalOpen = functionLib.isCalendarPopup();
if(isCalOpen.equals("true"))
{
 System.out.println("calendar is popup");
 functionLib.clickNow();
}
else
{
 System.out.println("calendar is not popup"); 
}
 

functionLib.Collapse

Collapses the object specified by String ID.

Format

The functionLib.Collapse method has the following command format(s):

functionLib.Collapse(StrId);

Command Parameters

StrId

a String specifying the String ID.

Throws

Exception

on any error.

Example

Collapses the object specified by String ID.

functionLib.Collapse("stringid");

functionLib.columnCount

Gets the number of currently visible columns in the list (determined by show more/less).

Format

The functionLib.columnCount method has the following command format(s):

functionLib.columnCount(xpath);

Command Parameters

xpath

a String specifying the object path should be taken from the any column header from the List Applet.

Throws

Exception

on any error.

Returns

an Integer number of currently visible rows.

Example

Gets the columns count of the List Applet and prints the custom message.

//Using Java variable.
int col = functionLib.columnCount("/web:window" +
 "/web:document" +
 "/web:div[@rn='Account' and @ot='JText' " +
  "and @un='Account']");
for(int i = 1; i< col ; i++)
{
 System.out.println("column number "+ i );
}

functionLib.commToolbarClassname

Gets the class attribute of the communication toolbar object from the target HTML element defined by the xpath.

Format

The functionLib.commToolbarClassname method has the following command format(s):

functionLib.commToolbarClassname(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

a String class name of the communication toolbar object.

Example

Gets the class attribute from the HTML DOM and prints the custom message.

//Using Java variable.
String value = functionLib.commToolbarClassname("/web:window" +
 "/web:document" +
 "/web:img[@rn='Release Work' and @ot='button' " +
  "and @un='Release_Work']");
if(value.equals("Release Work"))
{
 System.out.println("Pass");
}
else
{
 System.out.println("Fail");
}

functionLib.commToolbarGetRoProperty

Gets the property attribute of the target HTML element defined by the path.

Format

The functionLib.commToolbarGetRoProperty method has the following command format(s):

functionLib.commToolbarGetRoProperty(xpath, value);

Command Parameters

xpath

a String specifying the object path.

value

a String specifying the value to check in the CommunicationsToolbar list (rn, un, name and classname).

Throws

Exception

Returns

the current value of the test object property from the object in the application.

Example

Gets the UI name of the CommunicationsToolbar with the attribute un and prints the custom message.

//Using Java variable.
String value = functionLib.commToolbarGetRoProperty("/web:window[]" +
 "/web:document[]" +
 "/web:img[@rn='SignOn' and @ot='button' " +
  "and @un='SignOn']", "SignOn");  
System.out.println("CommunicationsToolbar repository name is "+value);

functionLib.commToolbarIsEnabled

Detects whether or not the communication toolbar object is enabled from the target HTML element defined by the xpath.

Format

The functionLib.commToolbarIsEnabled method has the following command format(s):

functionLib.commToolbarIsEnabled(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

true if the object is enabled, false if the object is disabled.

Example

Gets the "aria-disabled" attribute from the HTML DOM and prints the custom message.

//Using Java variable.
boolean chkEnble = functionLib.commToolbarIsEnabled("/web:window" +
 "/web:document" +
 "/web:img[@rn='Release Work' and @ot='button' " +
  "and @un='Release_Work']");
if(chkEnble)
{
 System.out.println("Pass");
}
else
{
 System.out.println("Fail");
}

functionLib.commToolbarRepositoryname

Gets the rn attribute of the communication toolbar object from the target HTML element defined by the xpath.

Format

The functionLib.commToolbarRepositoryname method has the following command format(s):

functionLib.commToolbarRepositoryname(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

a String repository name of the communication toolbar object.

Example

Gets the rn attribute from the HTML DOM and prints the custom message.

//Using Java variable.
String value = functionLib.commToolbarRepositoryname("/web:window" +
 "/web:document" +
 "/web:img[@rn='Release Work' and @ot='button' " +
  "and @un='Release_Work']");
if(value.equals("Release Work"))
{
 System.out.println("Pass");
}
else
{
 System.out.println("Fail");
}

functionLib.commToolbarShowButtonToolTip

Gets the alt attribute (ToolTip) of the target HTML element defined by the xpath.

Format

The functionLib.commToolbarShowButtonToolTip method has the following command format(s):

functionLib.commToolbarShowButtonToolTip(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

a String value specifying the alt attribute of the object.

Example

Gets the alt attribute of the toolbar object and prints the custom message.

//Using Java variable.
String value = functionLib.getPageTabRepositoryName("/web:window" +
 "/web:document" +
 "/web:img[@rn='Release Work' and @ot='button' " +
 "and @un='Release_Work']");
System.out.println("Alt tag value is "+value);

functionLib.commToolbarText

Gets the text value attribute of the communication toolbar object from the target HTML element defined by the xpath.

Format

The functionLib.commToolbarText method has the following command format(s):

functionLib.commToolbarText(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

a String text value of the communication toolbar object.

Example

Gets the text value from the HTML DOM and prints the custom message.

//Using Java variable.
String value = functionLib.commToolbarText("/web:window" +
 "/web:document" +
 "/web:img[@rn='Release Work' and @ot='button' " +
  "and @un='Release_Work']");
if(value.equals("Release Work"))
{
 System.out.println("Pass");
}
else
{
 System.out.println("Fail");
}

functionLib.commToolbarUiName

Gets the un attribute of the communication toolbar object from the target HTML element defined by the xpath.

Format

The functionLib.commToolbarUiName method has the following command format(s):

functionLib.commToolbarUiName(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

a String UI name of the communication toolbar object.

Example

Gets the un attribute from the HTML DOM and prints the custom message.

//Using Java variable.
String value = functionLib.commToolbarUiName("/web:window" +
 "/web:document" +
 "/web:img[@rn='Release Work' and @ot='button' " +
  "and @un='Release_Work']");
if(value.equals("Release Work"))
{
 System.out.println("Pass");
}
else
{
 System.out.println("Fail");
}

CommunicationtoolbarGetROproprty

The CommunicationtoolbarGetROproprty enum has the following values:

Table 20-3 List of CommunicationtoolbarGetROproprty Values

Value Description

classname

The Communicationtoolbar clasname attribute.

name

The Communicationtoolbar name attribute.

rn

The Communicationtoolbar rn (Repository Name) attribute.

un

The Communicationtoolbar un (UI Name) attribute.


functionLib.currencyAmount

Gets the Amount attribute of the target HTML element defined by the path.

Format

The functionLib.currencyAmount method has the following command format(s):

functionLib.currencyAmount(xpath);

functionLib.currencyAmount(xpath, rowid);

Command Parameters

xpath

a String specifying the object path.

rowid

an integer specifying the row ID of the object (should always start from one).

Throws

Exception

on any error.

Returns

the amount value of the currency field in the Form Applet.

Example

Gets the Amount of the currency object element and prints the custom message.

//Using Java variable.
String value = functionLib.currencyAmount("/web:window[]" +
 "/web:document[]" +
 "/web:input_text[@id='s_0_1_312_1']", 5);
 System.out.println("Currency Amount is "+value);

functionLib.currencyClassName

Gets the class attribute of the target HTML element defined by the xpath.

Common for both Form and List Applet.

Format

The functionLib.currencyClassName method has the following command format(s):

functionLib.currencyClassName(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

a String repository name of the currency object.

Example

Gets the repository name of the currency object and prints the custom message.

//Using Java variable.
String classname = functionLib.currencyClassName("/web:window" +
 "/web:document" +
 "/web:form[@name='SWEForm1_0']" +
 "/web:input_text[@rn='NetTotal' and @ot='JCalculator' " +
  "and @un='Quote Total']");
System.out.println("Class name is "+classname);

functionLib.currencyCode

Returns the Currency Code value of the currency field in the List Applet.

Format

The functionLib.currencyCode method has the following command format(s):

functionLib.currencyCode(xpath);

functionLib.currencyCode(xpath, rowid);

Command Parameters

xpath

a String specifying the object path should be taken from the specified column header from the List Applet.

rowid

an Integer specifying the row id of the record in the List Applet for which the Currency Code value is to be retrieved.

Throws

Exception

on any error.

Returns

a String Currency Code value.

Example

Returns the Currency Code value of the currency field.

//Using Java variable.
String curvalue = functionLib.currencyCode("/web:window" +
 "/web:document" +
 "/web:form[@name='SWEForm1_0' or @index='2']" +
 "/web:input_text[@rn='Sub-Status' and @ot='JComboBox' " +
 "and @un='Sub Status']", 2);
System.out.println("Currency code value is "+curvalue);

functionLib.currencyCodeClassName

Gets the classname attribute of the target HTML element defined by the path.

Format

The functionLib.currencyCodeClassName method has the following command format(s):

functionLib.currencyCodeClassName(xpath);

Command Parameters

xpath

a String specifying the currency code bject path.

Throws

Exception

on any error.

Returns

the classname of the currency code object.

Example

Gets the classname of the currency code object element and prints the custom message.

//Using Java variable.
String value = functionLib.currencyCodeClassName("/web:window" +
 "/web:document" +
 "/web:input_text[@id='s_0_1_313_1']");
System.out.println("Currency code classname is "+value);

functionLib.currencyCodeValue

Gets the Value attribute of the target HTML element defined by the path.

Format

The functionLib.currencyCodeValue method has the following command format(s):

functionLib.currencyCodeValue(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

the Currency Code value of the currency object.

Example

Gets the Value of the currency object element and prints the custom message.

//Using Java variable.
String value = functionLib.currencyCodeValue("/web:window[]" +
 "/web:document[]" +
 "/web:input_text[@id='s_0_1_313_0']");
System.out.println("currency code Value is "+value);

functionLib.currencyGetROProperty

Gets the specified attribute (rn, un, classname, value) of the target HTML element defined by the path.

This function should be used only for List Applets.

Format

The functionLib.currencyGetROProperty method has the following command format(s):

functionLib.currencyGetROProperty(xpath, propertyname);

functionLib.currencyGetROProperty(xpath, propertyname, row);

Command Parameters

xpath

a String specifying the object path.

propertyname

a String specifying the property (for example,: rn, un, classname, value) to get.

row

an Integer specifying the row number from the List Applet (should always start from one).

Throws

Exception

on any error.

Returns

a String value of the specified property.

Example

Gets the value of the currency element with the attribute value and prints the custom message if it matches the required value.

//Using Java variable.
String getAttribute = functionLib.currencyGetROProperty("/web:window" +
 "/web:document" +
 "/web:input_text[@rn='Revenue2' and @ot='JCurrencyCalc' " +
  "and @un='Revenue']", "value", 2); 
if(getAttribute.equals("$100.00"))
{
 System.out.println("Pass");
}
 else
{
 System.out.println("Fail");
}

functionLib.currencyIsEnabled

Detects whether the currency object is enabled or disabled.

This function should be used only for List Applets.

Format

The functionLib.currencyIsEnabled method has the following command format(s):

functionLib.currencyIsEnabled(xpath);

functionLib.currencyIsEnabled(xpath, row);

Command Parameters

xpath

a String specifying the object path.

row

an Integer specifying the row number from the List Applet (should always start from one).

Throws

Exception

on any error.

Returns

true if the object is enabled, false if the object is disabled.

Example

Detects whether the currency object is enabled or disabled and prints a custom message based on whether currency object is enabled or disabled.

//Using Java variable.
boolean currency = functionLib.currencyIsEnabled("/web:window" +
 "/web:document" +
 "/web:form[@name='SWEForm1_0']" +
 "/web:input_text[@rn='NetTotal' and @ot='JCalculator' " +
  "and @un='Quote Total']", 5);
if(currency)
{
 System.out.println("Pass");
}
else
{
 System.out.println("Fail");
} 

functionLib.currencyIsOpen

Detects whether the specified Currency popup is open or closed.

Format

The functionLib.currencyIsOpen method has the following command format(s):

functionLib.currencyIsOpen(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

true if the Currency popup is opened, false if the Currency popup is closed.

Example

Detect whether Currency popup is open or closed and prints a custom message.

//Using Java variable.
boolean value33 = functionLib.currencyIsOpen("/web:window[]" +
 "/web:document[]" +
 "/web:input_text[@id='s_0_1_313_0']");
if(value33)
{
 System.out.println("Currency popup is Opened"); 
}
else
{
 System.out.println("Currency popup is Closed"); 
}

functionLib.currencyRepositoryName

Gets the rn attribute of the target HTML element defined by the xpath.

Common for both Form and List Applet objects.

Format

The functionLib.currencyRepositoryName method has the following command format(s):

functionLib.currencyRepositoryName(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

a String value specifying the repository of the currency object.

Example

Gets the rn attribute of the currency object and prints the custom message.

//Using Java variable.
String currencyRN = functionLib.currencyRepositoryName("/web:window" +
 "/web:document" +
 "/web:form[@name='SWEForm1_0']" +
 "/web:input_text[@rn='NetTotal' and @ot='JCalculator' " +
 "and @un='Quote Total']");
System.out.println("currency Repository Name is "+currencyRN);

functionLib.CurrencyText

Gets the text value of the target HTML element defined by the xpath.

This Function should be used only for List Applets.

Format

The functionLib.CurrencyText method has the following command format(s):

functionLib.CurrencyText(xpath);

functionLib.CurrencyText(xpath, row);

Command Parameters

xpath

a String specifying the object path.

row

an Integer value specifying the row number from the List Applet (should always start from one).

Throws

Exception

on any error.

Returns

a String value specifying the text of the object.

Example

Gets the text value from the object for the second row of the List Applet and prints the custom message.

//Using Java variable.
String value = functionLib.CurrencyText("/web:window" +
 "/web:document" +
 "/web:div[@rn='Primary Revenue Amount' and @ot='JCurrencyCalc' " +
  "and @un='Revenue']", 2);
if(value.equals("$1,222.00"))
{
 System.out.println("Pass");
}
else
{
 System.out.println("Fail");
}

functionLib.currencyUiName

Gets the un attribute of the target HTML element defined by the xpath.

Common for both Form and List Applet objects.

Format

The functionLib.currencyUiName method has the following command format(s):

functionLib.currencyUiName(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

a String value of specifying the UIName of the Currency object.

Example

Gets the un attribute of the currency object and prints the custom message.

//Using Java variable.
String currencyUN = functionLib.currencyUiName("/web:window" +
 "/web:document" +
 "/web:form[@name='SWEForm1_0']" +
 "/web:input_text[@rn='NetTotal' and @ot='JCalculator' " +
  "and @un='Quote Total']");
 System.out.println("currency UIName is "+currencyUN); 

functionLib.DataLevel

Gets the level at which the Current row exists in the Hierarchial List Applet.

DataLevel=0 indicates the Parent level. DataLevel=1 indicates the first child level.

Format

The functionLib.DataLevel method has the following command format(s):

functionLib.DataLevel(xpath, row);

Command Parameters

xpath

a String specifying the object path. Should be taken from the specified column header from the List Applet.

row

an integer specifying the row number from the List Applet (should always start from one).

Throws

Exception

on any error.

Returns

a String value indicating the Level of the row in the Hierarchial List Applet.

Example

Gets the level at which the Current row exists in the Hierarchial List Applet and prints a custom messaage.

//Using Java variable.
String datalevel = functionLib.DataLevel("/web:window" +
 "/web:document" +
 "/web:div[(@rn='Name' and @ot='JText') " +
  "or @un='Name']", 3);
System.out.println("data level is " + datalevel);
 

functionLib.DataParentId

Gets the parent ID of the Specified row in the Hierarchial List Applet.

The attribute data-parentid=1 indicates the specified row's parent is one level above. data-parentid=-1 indicates it is at the parent level.

Format

The functionLib.DataParentId method has the following command format(s):

functionLib.DataParentId(xpath, row);

Command Parameters

xpath

a String specifying the object path. Should be taken from the specified column header from the List Applet.

row

an integer specifying the row number from the List Applet (should always start from one).

Throws

Exception

on any error.

Returns

a String value indicating the parent ID in the Hierarchial List Applet.

Example

Gets the parent ID of the Specified row and prints a custom message.

//Using Java variable.
String dataParentId = functionLib.DataParentId("/web:window" +
 "/web:document" +
 "/web:div[(@rn='Name' and @ot='JText') " +
  "or @un='Name']", 3);
System.out.println("data parent ID is " + dataParentId);
 

functionLib.dialogGetROProperty

Gets the specified attribute (property) of the target HTML element defined by the path.

Format

The functionLib.dialogGetROProperty method has the following command format(s):

functionLib.dialogGetROProperty(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

the current value of the test object property from the object in the application.

Example

Gets the current value of the test object property from the object in the application and prints the custom message.

//Using Java variable.
String value = functionLib.dialogGetROProperty("/web:dialog_confirm[]" +
 "/web:accDialog[@name='Message from webpage']"); 
System.out.println("Dialog Property is "+value);

functionLib.Drilldown

Drill down the specified object row of the List Applet.

Format

The functionLib.Drilldown method has the following command format(s):

functionLib.Drilldown(xpath, row);

Command Parameters

xpath

a String specifying the object path. Should be taken from the specified column header from the List Applet.

row

an integer specifying the row number from the List applet (should always start from one).

Throws

Exception

on any error.

Example

Get the xpath of the column header in the List Applet and the row number pass as the two arguments.

functionLib.Drilldown("/web:window" +
 "/web:document" +
 "/web:div[@rn='Name' and @ot='JText' " +
  "and @un='Name']",2);

functionLib.Expand

Expands the object specified by String ID.

Format

The functionLib.Expand method has the following command format(s):

functionLib.Expand(StrId);

Command Parameters

StrId

a String specifying the String ID.

Throws

Exception

on any error.

Example

Expands the object specified by String ID.

functionLib.Expand("stringid");

functionLib.extractId

Extracts and returns the ID attribute value of the given Xpath.

Format

The functionLib.extractId method has the following command format(s):

functionLib.extractId(xpath, x, y, rowid);

Command Parameters

xpath

a String specifying the object path.

x

a char value for specifying the ID attribute value to be extracted.

y

a char value for specifying the ID attribute value to be extracted.

rowid

an Integer specifying the row id value.

Returns

a String with unique value.

Example

Extracts and returns the ID attribute value of the given Xpath.

//Using Java variable.
char val[] = new char[]{'r','n'};
String extractid = functionLib.extractId("/web:window" +
 "/web:document" +
 "/web:div[@rn='Name' and @ot='JText' " +
 "and @un='Name']", val[0], val[1], 2);

functionLib.focus

Sets focus to the target HTML element defined by the path.

Format

The functionLib.focus method has the following command format(s):

functionLib.focus(attribute);

Command Parameters

attribute

a String specifying the property name.

Throws

Exception

on any error.

Returns

a String of the specified attribute.

Example

Sets focus to the target HTML element defined by the path, retrives the specified attribute, and prints the attribute value.

//Using Java variable.
String g = functionLib.focus("type");
System.out.println(g);

functionLib.formRecordNumber

Gets the form record number.

Format

The functionLib.formRecordNumber method has the following command format(s):

functionLib.formRecordNumber( );

Throws

Exception

on any error.

Returns

a String record number.

Example

Gets the form record number.

//Using Java variable.
String formrecnum = functionLib.formRecordNumber();
System.out.println("Record number is "+formrecnum);

functionLib.generateID

Generate the ID from the given row.

Format

The functionLib.generateID method has the following command format(s):

functionLib.generateID(xpath, row);

Command Parameters

xpath

a String specifying the object path should be taken from the specified column header from the List Applet.

row

an Integer specifying the row number.

Throws

Exception

on any error.

Returns

a String ID value.

Example

Generate the ID from the given row.

//Using Java variable.
String idvalue = functionLib.generateID("/web:window" +
 "/web:document" +
 "/web:form[@name='SWEForm1_0' or @index='2']" +
 "/web:input_text[@rn='Sub-Status' and @ot='JComboBox' " +
 "and @un='Sub Status']", 2);
System.out.println("ID value is "+idvalue);

functionLib.getCellData

Gets the text for a specified cell when the cell has same repository name across multipal applets in same screen..

Format

The functionLib.getCellData method has the following command format(s):

functionLib.getCellData(xpath, row);

functionLib.getCellData(xpath, row, AppletRepName);

Command Parameters

xpath

a String specifying the object path should be taken from the specified column header from the List Applet.

row

an Integer specifying the row number from the List Applet (should always start from one).

AppletRepName

a string specifying the repository name of the Applet().

Throws

Exception

on any error.

Returns

a String specifying the text for a specified cell.

Example

Gets the rows count of the List Applet, loops, and prints the custom message for all the rows.

//Using Java variable.
int rows = functionLib.rowCount("/web:window" +
 "/web:document" +
 "/web:div[@rn='PenaltyAmount' " +
  "and @ot='JCurrencyCalc']");
for(int i = 1; i< rows ; i++)
{
 System.out.println(functionLib.getCellData("/web:window" +
  "/web:document" +
  "/web:div[@rn='PenaltyAmount' " +
   "and @ot='JCurrencyCalc']", i ,"ISS Promotion Upgrade To List Applet")); 
}

functionLib.GetChildCount

Gets the child count of the object specified by String ID.

Format

The functionLib.GetChildCount method has the following command format(s):

functionLib.GetChildCount(strId);

Command Parameters

strId

a String specifying the String ID.

Throws

Exception

on any error.

Returns

an Integer of the child count.

Example

Gets the child count of the specified object.

//Using Java variable.
int count = functionLib.GetChildCount("stringid");
System.out.println("Child count is "+count);

functionLib.getMonthNumber

Gets the number of the specified month.

Format

The functionLib.getMonthNumber method has the following command format(s):

functionLib.getMonthNumber(month);

Command Parameters

month

a String specifying the month in three-letter format.

Returns

an Integer of the month number.

Example

Gets the number of the month.

int curMonth = functionLib.getMonthNumber("Dec");
 System.out.println("Month is "+curMonth);

functionLib.getNumberMonth

Gets the equivalent month for the corresponding number.

Format

The functionLib.getNumberMonth method has the following command format(s):

functionLib.getNumberMonth(val);

Command Parameters

val

an integer that specifies the number for that month (should always start from zero). For example. 0, 1 ,2.

Throws

Exception

on any error.

Returns

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".

Example

Gets the equivalent month for the corresponding number.

//Using Java variable.
String month = functionLib.getNumberMonth(3);
System.out.println("Month is " +month);

functionLib.getPageTabRepositoryName

Gets the rn attribute of the target HTML element defined by the xpath.

Inspect element on the tab and input the same to the function.

Format

The functionLib.getPageTabRepositoryName method has the following command format(s):

functionLib.getPageTabRepositoryName(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

a String repository name of the pagetab object.

Example

Gets the repository name of the pagetab object and prints the custom message.

//Using Java variable.
String pagerp = functionLib.getPageTabRepositoryName("/web:window" +
 "/web:document" +
 "/web:a[@text='Accounts']");
if(pagerp.equals("Accounts"))
{
 System.out.println("Pass");
}
else
{
 System.out.println("Fail");
}

functionLib.getPageTabRepositoryNameByIndex

Gets the rn attribute of the target HTML element defined by the xpath using index.

Inspect path on the tab and input the same to the function.

Format

The functionLib.getPageTabRepositoryNameByIndex method has the following command format(s):

functionLib.getPageTabRepositoryNameByIndex(xpath, index);

Command Parameters

xpath

a String specifying the object path.

index

an Integer. use inspect path on the element to get index.

Throws

Exception

on any error.

Returns

a String repository name of the pagetab object.

Example

Gets the repository name of the pagetab object and prints the custom message.

//Using Java variable.
String pagerp = functionLib.getPageTabRepositoryNameByIndex("/web:window" +
 "/web:document" +
 "/web:a[@text='Accounts']", 1);
System.out.println("Repository name is "+pagerp);

getROPropertyAdvancedEdit

The getROPropertyAdvancedEdit enum has the following values:

Table 20-4 List of getROPropertyAdvancedEdit Values

Value Description

classname

The ROPropertyAdvancedEdit classname attribute.

rn

The ROPropertyAdvancedEdit rn (Repository Name) attribute.

un

The ROPropertyAdvancedEdit un (UI Name) attribute.

value

The ROPropertyAdvancedEdit value attribute.


GetROPropertyApplet

The GetROPropertyApplet enum has the following values:

Table 20-5 List of GetROPropertyApplet Values

Value Description

exist

The exist attribute of the Object.

rn

The rn (Repository Name) attribute of the Object.

un

The un (UI Name) attribute of the Object.


GetROPropertyBtn

The GetROPropertyBtn enum has the following values:

Table 20-6 List of GetROPropertyBtn Values

Value Description

classname

The classname attribute of the Object.

isenabled

The isenabled attribute of the Object.

rn

The rn (Repository Name) attribute of the Object.

text

Retrieve the text of the Object.

un

The un (UIName) attribute of the Object.


GetROPropertyCheckbox

The GetROPropertyCheckbox enum has the following values:

Table 20-7 List of GetROPropertyCheckbox Values

Value Description

isChecked

The ROPropertyCheckbox isChecked attribute.

isEnabled

The ROPropertyCheckbox isEnabled attribute.

rn

The ROPropertyCheckbox rn (Repository Name) attribute.

un

The ROPropertyCheckbox un (UI Name) attribute.


GetROPropertyImage

The GetROPropertyImage enum has the following values:

Table 20-8 List of GetROPropertyImage Values

Value Description

classname

The ROPropertyImage classname attribute.

isenabled

The ROPropertyImage isenabled attribute.

repositoryname

The ROPropertyImage repositoryname attribute.

text

The ROPropertyImage text attribute.

uiname

The ROPropertyImage uiname attribute.


GetROPropertyLink

The GetROPropertyLink enum has the following values:

Table 20-9 List of GetROPropertyLink Values

Value Description

classname

The ROPropertyLink classname attribute.

isenabled

The ROPropertyLink isenabled attribute.

repositoryname

The ROPropertyLink repositoryname attribute.

text

The ROPropertyLink text attribute.

uiname

The ROPropertyLink uiname attribute.


GetROPropertyPDQ

The GetROPropertyPDQ enum has the following values:

Table 20-10 List of GetROPropertyPDQ Values

Value Description

rn

The ROPropertyPDQ rn (Repository Name) attribute.

text

The ROPropertyPDQ text attribute.

un

The ROPropertyPDQ un (UI Name) attribute.


GetROPropertyScreen

The GetROPropertyScreen enum has the following values:

Table 20-11 List of GetROPropertyScreen Values

Value Description

classname

The ROPropertyScreen classname attribute.

rn

The ROPropertyScreen rn (Repository Name) attribute.

un

The ROPropertyScreen un (UI Name) attribute.

value

The ROPropertyScreen value attribute.


GetROPropertyText

The GetROPropertyText enum has the following values:

Table 20-12 List of GetROPropertyText Values

Value Description

classname

The ROPropertyText classname attribute.

isenabled

The ROPropertyText isenabled attribute.

rn

ROPropertyText rn (Repository Name) attribute.

text

The ROPropertyText text attribute.

un

The ROPropertyText un (UI Name) attribute.


functionLib.GetTreeItemName

Gets the name of the tree item specified by String ID.

Format

The functionLib.GetTreeItemName method has the following command format(s):

functionLib.GetTreeItemName(StrId);

Command Parameters

StrId

a String specifying the String ID.

Throws

Exception

on any error.

Returns

a String of the active tree item name.

Example

Gets the name of the tree item.

//Using Java variable.
String treename = functionLib.GetTreeItemName("stringid");
System.out.println("Tree name is "+treename);

functionLib.getUiName

Gets the un attribute or name of the object as it appears in the user interface of the target HTML element defined by the path.

Format

The functionLib.getUiName method has the following command format(s):

functionLib.getUiName(xpath);

Command Parameters

xpath

a String specifying the property to get.

Throws

Exception

on any error.

Returns

a String value of the specified property.

Example

Gets the un attribute of the Link object and prints a custom message.

//Using Java variable.
String chkbox = functionLib.getUiName("/web:window" +
 "/web:document" +
 "/web:div[@rn='Row Status' and @ot='JCheckBox' and @un='New']");
System.out.println("UI name is "+chkbox);

functionLib.Hcollapse

Collapses the specified row in the Hierarchial List Applet.

Format

The functionLib.Hcollapse method has the following command format(s):

functionLib.Hcollapse(xpath, row);

Command Parameters

xpath

a String specifying the object path. Should be taken from the specified column header from the List Applet.

row

an integer specifying the row number from the List Applet (should always start from one).

Throws

Exception

on any error.

Example

Collapses the specified row in the Hierarchial List Applet.

functionLib.Hcollapse("/web:window" +
 "/web:document" +
 "/web:div[(@rn='Name' and @ot='JText') " +
  "or @un='Name']", 2);
 

functionLib.Hexpand

Expands the specified row in the Hierarchial List Applet.

Format

The functionLib.Hexpand method has the following command format(s):

functionLib.Hexpand(xpath, row);

Command Parameters

xpath

a String specifying the object path. Should be taken from the specified column header from the List Applet.

row

an integer specifying the row number from the List Applet (should always start from one).

Throws

Exception

on any error.

Example

Expands the specified row in the Hierarchial List Applet.

functionLib.Hexpand("/web:window" +
 "/web:document" +
 "/web:div[(@rn='Name' and @ot='JText') " +
  "or @un='Name']", 1);
 

functionLib.iconColor

Gets the color of the icon in the List Applet.

Format

The functionLib.iconColor method has the following command format(s):

functionLib.iconColor(xpath, row);

Command Parameters

xpath

a String specifying the object path should be taken from the specified column header of the List Applet.

row

an integer specifying the row number from the List Applet (should always start from one).

Throws

Exception

on any error.

Returns

a String specifying the color of the icon alt tag value from the DOM.

Example

Gets the color of the icon in the List Applet.

//Using Java variable.
String V_icon_color_green=functionLib.iconColor("/web:window" +
 "/web:document" +
 "/web:div[(@rn='StateIcon' and @ot='JText') " +
  "or @un='State']", 2);
System.out.println(V_icon_color_green); 
 

functionLib.imageGetRoProperty

Gets the property attribute of the target HTML element defined by the path.

Format

The functionLib.imageGetRoProperty method has the following command format(s):

functionLib.imageGetRoProperty(propertyName, xpath);

Command Parameters

propertyName

a String specifying the property (for example, classname, isenabled, repositoryname, text, uiname) to get.

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

the String value of the specified property.

Example

Gets the text of the image object with the attribute text and prints the custom message.

//Using Java variable.
String value = functionLib.imageGetRoProperty("text","/web:window[]" +
 "/web:document[]" +
 "/web:img[]");
System.out.println("Image text is  "+value);

functionLib.isCalculatorPopup

Detects whether pecified Calculator popup is opened or closed.

Format

The functionLib.isCalculatorPopup method has the following command format(s):

functionLib.isCalculatorPopup( );

Throws

Exception

on any error.

Returns

boolean true if the calculator is opened, false if the calculator is closed.

Example

Detects whether the calculator is opened or closed.

//Using Java variable.
boolean ispopup = functionLib.isCalculatorPopup();
if(ispopup)
{
 System.out.println("calculator is opened");
}
else
{
 System.out.println("calculator is closed"); 
}

functionLib.isCalendarPopup

Detects whether the Calendar is opened or closed.

Format

The functionLib.isCalendarPopup method has the following command format(s):

functionLib.isCalendarPopup( );

Throws

Exception

on any error.

Returns

a String true if the calendar is opened, false if the calendar is closed.

Example

Detects whether the calendar is opened or closed and prints a custom message.

//Using Java variable.
String ispopup = functionLib.isCalendarPopup();
if(ispopup.equals("true"))
{
 System.out.println("calendar is opened");
}
else
{
 System.out.println("calendar is closed"); 
}

functionLib.isCheckboxChecked

Detects whether or not the specified checkbox object is checked for the List Applet.

Format

The functionLib.isCheckboxChecked method has the following command format(s):

functionLib.isCheckboxChecked(xpath);

functionLib.isCheckboxChecked(xpath, row);

Command Parameters

xpath

a String specifying the object xpath.

row

an Integer specifying the row number for the List Applet (should always starts from one) .

Throws

Exception

on any error.

Returns

true if the object is checked, false if the object is unchecked.

Example

Detects whether the checkbox object is checked or unchecked and prints a custom message based on whether the checkbox object is checked or unchecked.

//Using Java variable.
boolean chkbox = functionLib.isCheckboxChecked("/web:window" +
 "/web:document" +
 "/web:div[@rn='Row Status' and @ot='JCheckBox' and @un='New']", 1);
if(chkbox)
{
 System.out.println("Checked");
}
else
{
 System.out.println("Unchecked");
} 

functionLib.isCheckboxEnabled

Detects whether the specified checkbox object is enabled or disabled for the List Applet.

Format

The functionLib.isCheckboxEnabled method has the following command format(s):

functionLib.isCheckboxEnabled(xpath);

functionLib.isCheckboxEnabled(xpath, row);

Command Parameters

xpath

a String specifying the object xpath.

row

an Integer specifying the row number for the List Applet (should always start from one).

Throws

Exception

on any error.

Returns

true if the object is enabled, false if the object is disabled.

Example

Detects whether checkbox object is enabled or disabled and prints a custom message based on whether the checkbox object is enabled or disabled.

//Using Java variable.
boolean chkbox = functionLib.isCheckboxEnabled("/web:window" +
 "/web:document" +
 "/web:div[@rn='Row Status' and @ot='JCheckBox' and @un='New'],1"); 
if(chkbox)
{
 System.out.println("enabled");
}
else
{
 System.out.println("disabled");
}

functionLib.isColumnExist

Detects wheather the specified column exist or not in the List Applet.

Format

The functionLib.isColumnExist method has the following command format(s):

functionLib.isColumnExist(AppletRepName, ColumnRepName);

Command Parameters

AppletRepName

a String specifying the RepositoryName of the Applet in which Column is present.

ColumnRepName

a String specifying the RepositoryName of the column.

Throws

Exception

on any error.

Returns

true if the column exists, false if the column does not exist.

Example

Detects the coulmn existence and prints the custom message.

if(functionLib.isColumnExist("SIS Account List Applet", "Name"))
{
 System.out.println("Exists");
}
else
{
 System.out.println("Does not exist");
}

functionLib.isColumnwritable

Detects the the state of table column, where state is the value of the column's disabled or read-only property.

Format

The functionLib.isColumnwritable method has the following command format(s):

functionLib.isColumnwritable(xpath);

Command Parameters

xpath

a String specifying the object path should be taken from the specified column header from the List Applet.

Throws

Exception

on any error.

Returns

true if the object is writable, false if the object is readonly.

Example

Detects the the state of table column and prints the custom message.

//Using Java variable.
boolean writable = functionLib.isColumnwritable("/web:window" +
 "/web:document" +
 "/web:div[@rn='First Name' and @ot='JText' " +
  "and @un='First Name']");
if(writable)
{
 System.out.println("Writable");
}
else
{
 System.out.println("Not writable");
}

functionLib.isExpanded

Detects whether the object specified by String ID is expanded or not.

Format

The functionLib.isExpanded method has the following command format(s):

functionLib.isExpanded(strId);

Command Parameters

strId

a String specifying the String ID.

Throws

Exception

on any error.

Returns

String true if the object is expanded, false if the object is not expanded.

Example

Detect whether the object is expanded and prints a custom message.

//Using Java variable.
String expanded = functionLib.isExpanded("stringid");
if (expanded.equals("true"))
{
 System.out.println("Expanded");
}
else
{
 System.out.println("Not expanded");
}

functionLib.isHierarchialListExpanded

Detects if the specified row is expanded or not in the Hierarchial List Applet.

Format

The functionLib.isHierarchialListExpanded method has the following command format(s):

functionLib.isHierarchialListExpanded(xpath, row);

Command Parameters

xpath

a String specifying the object path. Should be taken from the specified column header from the List Applet.

row

an integer specifying the row number from the List Applet (should always start from one).

Throws

Exception

on any error.

Returns

a String true if the row is expanded, false if the row is not expanded.

Example

Detects if the specified row is expanded or not in the Hierarchial List Applet and prints a custom message.

//Using Java variable.
String isExpanded = functionLib.isHierarchialListExpanded("/web:window" +
 "/web:document" +
 "/web:div[(@rn='Name' and @ot='JText') " +
  "or @un='Name']", 3);
if(isExpanded.equals("true"))
{
 System.out.println("Row is expanded");
}
else
{
 System.out.println("Row is not expanded"); 
}
 

functionLib.isPopupApplet

Detects whether or not the current Applet represents a popup Applet.

Format

The functionLib.isPopupApplet method has the following command format(s):

functionLib.isPopupApplet( );

Throws

Exception

on any error.

Returns

true if the popup exists, false if it does not exist.

Example

Detects whether or not the popup exists and prints the custom message if it exists or does not exist.

//Using Java variable.
Boolean exist = functionLib.isPopupApplet();   
//Using If condition to compare with expected.
if (exist) 
{
 System.out.println("popup exists");
}
else
{
 System.out.println("popup does not exist");
}

functionLib.isRequired

Detects whether the specified object is required or not.

(This function can be verified only on the Form Applet because asterisk mark is seen only on the form.)

Format

The functionLib.isRequired method has the following command format(s):

functionLib.isRequired(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

true if the object is required.

Example

Indicates whether the object is required and prints the custom message.

//Using Java variable.
boolean value = functionLib.isRequired("/web:window[]" +
 "/web:document[]" +
 "/web:form[@name='SWEForm1_0']" +
 "/web:input_text[@rn='Type' and @ot='JComboBox' " +
  "and @un='Account Type']");
System.out.println("The object Required is "+value);

functionLib.IsSelected

Detects whether the object specified by String ID is selected or not.

Format

The functionLib.IsSelected method has the following command format(s):

functionLib.IsSelected(strId);

Command Parameters

strId

a String specifying the String ID.

Throws

Exception

on any error.

Returns

String true if the object is selected, false if the object is not selected.

Example

Detect whether or not the object is selected and prints a custom message.

//Using Java variable.
String selected = functionLib.IsSelected("stringid");
if (selected.equals("true"))
{
 System.out.println("Selected");
}
else
{
 System.out.println("Not selected");
}

functionLib.l2Count

Gets the specified number of views of the target HTML element defined by the path.

Format

The functionLib.l2Count method has the following command format(s):

functionLib.l2Count( );

Throws

Exception

on any error.

Returns

the number of views present in the Second Level View Bar.

Example

Gets the number of views present in the Second Level View Bar and prints the custom message.

//Using Java variable.
int value = functionLib.l2Count();
System.out.println("Number of Views present in the second " +
 "level view bar is "+value);

functionLib.linkGetRoProperty

Gets the propertyname attribute of the target HTML element defined by the path.

Format

The functionLib.linkGetRoProperty method has the following command format(s):

functionLib.linkGetRoProperty(propertyName, xpath);

Command Parameters

propertyName

a String specifying the property (for example, text, uiname, classname, repositoryname, isenabled) to get.

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

the String value of the specified property.

Example

Gets the text of the link element with the attribute text and prints the custom message.

//Using Java variable.
String value = functionLib.linkGetRoProperty("text","/web:window[]" +
 "/web:document[]" +
 "/web:a[@text='Abu Nidal organization (ANO)']");
System.out.println("link text is "+value);

functionLib.log

Writes the specified message String to a results log file.

The log file is named "Results_randomFileName.txt" and is stored in the current drive path specified in the Eclipse properties.

Format

The functionLib.log method has the following command format(s):

functionLib.log(message);

Command Parameters

message

an String that specifies the text to write to the log file.

Throws

IOException

on any IO error.

Example

Writes the specified message String to a results log file.

functionLib.log("Log this message");

functionLib.Login

Launches the browser and logs into the Application.

Format

The functionLib.Login method has the following command format(s):

functionLib.Login(UserType, BrowserName, EnvName);

Command Parameters

UserType

a String indicates the user type. for example, SADMIN, DJROSEN, BFSCRANT ,etc.

BrowserName

a String indicates the name of the browser. (For example, callcenter, eCommunications etc

EnvName

a String Environment name created from the ATC portal.

Throws

Exception

on any error.

Example

Launches the browser and logs in.

functionLib.Login("SADMIN", "callcenter", "Environment name"); 

functionLib.make_uniq

Creates unique record by appending the date and time to the record passed as argument.

Format

The functionLib.make_uniq method has the following command format(s):

functionLib.make_uniq(recordName);

Command Parameters

recordName

a String which needs to be made unique.

Returns

a String with unique value.

Example

Creates unique record by appending the date and time to "test".

//Using Java variable.
String unique = functionLib.make_uniq("test");
System.out.println("Unique value is "+unique);

functionLib.menuCount

Gets the number of menu items from the Applet Level Menu object.

Inspects the path on the menu button and use the same path for the input to the function.

Format

The functionLib.menuCount method has the following command format(s):

functionLib.menuCount(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

an Integer specifying the number of menu items.

Example

Gets the number of items from the menu object and prints a custom message.

//Using Java variable.
int items = functionLib.menuCount("/web:window" +
 "/web:document" +
 "/web:form[@name='SWEForm1_0' or @index='1']" +
 "/web:button[@id='s_at_m_1' or @index='3']");
System.out.println("Number of menu items "+items);

functionLib.menuItemClassName

Gets the classname attribute the target HTML element defined by the path.

This Function is common for both List and Form Applets.

Format

The functionLib.menuItemClassName method has the following command format(s):

functionLib.menuItemClassName(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

the classname of the menu object.

Example

Gets the classname of the menu object element and prints the custom message.

//Using Java variable.
String value = functionLib.menuItemClassName("/web:window[]" +
 "/web:document[]" +
 "/web:a['@text='Save List']"); 
System.out.println("Menu Item classname is "+value);

functionLib.menuItemClick

Clicks and selects the item from the menu list.

Format

The functionLib.menuItemClick method has the following command format(s):

functionLib.menuItemClick(rn);

Command Parameters

rn

a String specifying the rn value of the item to be selected.

Throws

Exception

on any error.

Example

Clicks and selects the item from the menu list.

functionLib.menuItemClick("*Browser Applet* *Import*SIS Account List Applet* *420*230*true");

functionLib.menuItemEnabled

Detects whether or not the specified menu object or menu item is enabled.

Format

The functionLib.menuItemEnabled method has the following command format(s):

functionLib.menuItemEnabled(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

true if the object is enabled, false if the object is disabled.

Example

Detects whether checkbox object is enabled or disabled and prints a custom message.

//Using Java variable.
boolean value = functionLib.menuItemEnabled("/web:window" +
 "/web:document" +
 "/web:form[@name='SWEForm1_0' or @index='1']" +
 "/web:button[@id='s_at_m_1' or @index='3']");
if(value)
{
 System.out.println("Menu item is enabled");
}
else
{
 System.out.println("Menu item is disabled");
}

functionLib.menuItemExist

Detects whether or not the specified menu object or menu item exists.

Format

The functionLib.menuItemExist method has the following command format(s):

functionLib.menuItemExist(rn);

Command Parameters

rn

a String specifying the rn value of the menu object or item.

Throws

Exception

on any error.

Returns

true if the object exists, false if the object is disabled.

Example

Detect whether or not the menu item object exists and prints a custom message.

//Using Java variable.
boolean menuExists = functionLib.menuItemExist("*Browser Applet* *ExecuteQuery*SIS Account List Applet* "); 
if(menuExists)
{
 System.out.println("Menu item exists");
}
else
{
 System.out.println("Menu item does not exist");
}
 

functionLib.menuItemGetRepositoryName

Gets the rn attribute of the target HTML element defined by the xpath.

Format

The functionLib.menuItemGetRepositoryName method has the following command format(s):

functionLib.menuItemGetRepositoryName(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

a String repository name of the menu object.

Example

Gets the repository name of the menu object and prints the custom message.

//Using Java variable.
String menuRP = functionLib.menuItemGetRepositoryName("/web:window" +
 "/web:document" +
 "/web:form[@name='SWEForm1_0' or @index='1']" +
 "/web:button[@id='s_at_m_1' or @index='3']");
System.out.println("Repository name is"+menuRP);

functionLib.menuItemGetUiName

Gets the un attribute of the target HTML element defined by the path.

This Function is common for both List and Form Applets.

Format

The functionLib.menuItemGetUiName method has the following command format(s):

functionLib.menuItemGetUiName(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

the UI name (display name in the user interface) of the menu object.

Example

Gets the UI name of the menu object element and prints the custom message.

//Using Java variable.
String value = functionLib.menuItemGetUiName("/web:window[]" +
 "/web:document[]" +
 "/web:a['@text='Save List']");
System.out.println("Menu item UI name is "+value);

functionLib.menuItemRepositoryName

Gets the rn attribute of the target HTML element defined by the xpath.

Format

The functionLib.menuItemRepositoryName method has the following command format(s):

functionLib.menuItemRepositoryName(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

a String repository name of the menu object.

Example

Gets the repository name of the menu object and prints the custom message.

//Using Java variable.
String menurp = functionLib.menuItemRepositoryName("/web:window" +
 "/web:document" +
 "/web:form[@name='SWEForm1_0' or @index='1']" +
 "/web:button[@id='s_at_m_1' or @index='3']");
System.out.println("Repository name is"+menurp);

functionLib.monthMapping

Gets the equivalent month for the corresponding string value from the Document Object Model(DOM).

Format

The functionLib.monthMapping method has the following command format(s):

functionLib.monthMapping(vall);

Command Parameters

vall

a String that specifies the number for that month (should always starts from zero). For example, 0, 1, 2.

Throws

Exception

on any error.

Returns

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".

Example

Gets the equivalent month.

String month = functionLib.monthMapping("5");

months

The months enum has the following values:

Table 20-13 List of months Values

Value Description

Jan

January

Feb

February

Mar

March

Apr

April

May

May

Jun

June

Jul

July

Aug

August

Sep

September

Oct

October

Nov

November

Dec

December


functionLib.Navigate_Screen

Navigates to the Screen/View from SiteMap.

Format

The functionLib.Navigate_Screen method has the following command format(s):

functionLib.Navigate_Screen(RepName, L1UIName, L2VName, L2UIName);

Command Parameters

RepName

a String specifying the repository name.

L1UIName

a String specifying the level 1 SiteMap UI name.

L2VName

a String specifying the level 2 SiteMap View name.

L2UIName

a String specifying the level 2 SiteMap UI name.

Throws

Exception

on any error.

Example

Navigates to the Screen/View from SiteMap.

functionLib.Navigate_Screen("RepName", "Level 1 UIName", 
 "Level 2 SiteMap View", "Level 2 UIName");

functionLib.Nextmonth

Gets the number of the next month.

Format

The functionLib.Nextmonth method has the following command format(s):

functionLib.Nextmonth(val);

Command Parameters

val

an Integer specifying the current month number.

Returns

an Integer of the month number.

Example

Gets the number of the next month.

int curMonth = functionLib.getMonthNumber("Dec");
 int nextmonth = functionLib.Nextmonth(curMonth);
 System.out.println("Next month is "+nextmonth);

functionLib.NextPage

Go to the next page of the specified Applet.

Format

The functionLib.NextPage method has the following command format(s):

functionLib.NextPage(Rn_Applet);

Command Parameters

Rn_Applet

a String specifying the Applet.

Throws

Exception

on any error.

Example

Go to the next page of the specified Applet.

functionLib.NextPage("Rn Applet");

functionLib.notificationCount

Gets the notificationCount attribute of the target HTML element defined by the path.

Format

The functionLib.notificationCount method has the following command format(s):

functionLib.notificationCount(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

the notification pane size count.

Example

Gets the notificationCount attribute of the target HTML element.

//Using Java variable.
int value = functionLib.notificationCount("/web:window" +
 "/web:document" +
 "/web:span[]"); 
 System.out.println("Notification pane size count is "+value);

functionLib.openCellElement

Clicks on the element inside the specified cell.

Format

The functionLib.openCellElement method has the following command format(s):

functionLib.openCellElement(columnxpath, row);

Command Parameters

columnxpath

a String specifying the object path should be taken from the specified column header from the List Applet..

row

an Integer specifying the row number from the List Applet (should always start from one).

Throws

Exception

on any error.

Returns

a String specifying the text for a specified cell.

Example

Gets the rows count of the List Applet. Then, loop and opens the cell for all the rows.

//Using Java variable.
int rows = functionLib.rowCount("/web:window" +
 "/web:document" +
 "/web:div[@rn='Type' and @ot='JComboBox' " +
  "and @un='Account Type']");
for(int i = 1; i< rows ; i++)
{
 functionLib.openCellElement("/web:window" +
  "/web:document" +
  "/web:div[@rn='Type' and @ot='JComboBox' " +
    "and @un='Account Type']", i );
}

functionLib.openpopup

Opens the pop up for the specified field in the List Applet.

Format

The functionLib.openpopup method has the following command format(s):

functionLib.openpopup(xpath);

functionLib.openpopup(xpath, row);

Command Parameters

xpath

a String specifying the object path.

row

an integer specifying the row number from the List Applet (should always start from one).

Throws

Exception

on any error.

Example

Opens the pop up for the specified field.

functionLib.openpopup("/web:window" +
 "/web:document" +
 "/web:div[@rn='Start Date' and @ot='JDatePick' " +
  "and @un='Effective As Of'], 2");
 

functionLib.openUiSync

Waits until classname siebui-busy is active.

This function waits until the siebel application is in busy state before performing any operation on the UI.

Format

The functionLib.openUiSync method has the following command format(s):

functionLib.openUiSync( );

Throws

Exception

on any error.

Example

Waits until the siebel application is in a busy state.

//Using Java variable.
web.link(11,"//web:a[@rn='Sitemap.Activities Screen' " +
 "and @ot='SiebWebSitemapAnchor' or @un='Activities']")
 .click();
functionLib.openUiSync();

functionLib.pageTabActiveScreen

Gets the rn attribute of the target HTML element defined by the xpath.

Format

The functionLib.pageTabActiveScreen method has the following command format(s):

functionLib.pageTabActiveScreen(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

a String specifying the repository name of the pagetab active screen.

Example

Gets the repository name of the pagetab object and prints the custom message.

//Using Java variable.
String pageactive = functionLib.pageTabActiveScreen("/web:window" +
 "/web:document" +
 "/web:a[@text='Accounts']");
System.out.println("Repository name is "+pageactive);

functionLib.pageTabIsExists

Detects whether or not the specified Pagetab object exists.

Format

The functionLib.pageTabIsExists method has the following command format(s):

functionLib.pageTabIsExists(Xpath, TabRepName);

Command Parameters

Xpath

a String specifying the object path.

TabRepName

a String specifying the Repository Name of the object.

Throws

Exception

on any error.

Returns

true if the Pagetab object exists. Return false if the Pagetab object does not exist.

Example

Detects whether or not the Pagetab object exists and print a custom message.

//Using Java variable.
boolean value = functionLib.pageTabIsExists("/web:window[]" +
 "/web:document[]" +
 "/web:a[]", "Account Screen Homepage View");
if(value)
{
 System.out.println("Pagetab object exists");
}
else
{
 System.out.println("Pagetab object does not exist");
}

pagetabsGetROProperty

The pagetabsGetROProperty enum has the following values:

Table 20-14 List of pagetabsGetROProperty Values

Value Description

activeView

The pagetabs activeView attribute.

pageTabActiveScreen

The pagetabs pageTabActiveScreen attribute.

screenCount

The pagetabsscreenCount attribute.

viewCount

The pagetabs viewCount attribute.


functionLib.pagetabsGetROProperty

Gets the specified attribute (pageTabActiveScreen, activeView, screenCount, viewCount) of the target HTML element defined by the path.

Format

The functionLib.pagetabsGetROProperty method has the following command format(s):

functionLib.pagetabsGetROProperty(propertyName);

Command Parameters

propertyName

a String specifying the property (Eg : pageTabActiveScreen, activeView, screenCount, viewCount) to get.

Throws

Exception

on any error.

Returns

the String value of the specified property.

Example

Gets the active view of the pagetab element with the attribute activeView and prints the custom message.

//Using Java variable.
String value = functionLib.pagetabsGetROProperty("activeView");
System.out.println("Pagetab repository name is "+value);

functionLib.pdqActive

Gets a data value representing the visible query title of the target HTML element defined by the xpath.

Format

The functionLib.pdqActive method has the following command format(s):

functionLib.pdqActive(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

a String repository name of the PDQ object.

Example

Gets a data value representing the visible query title and prints a custom message.

//Using Java variable.
String value = functionLib.pdqActive("/web:window" +
 "/web:document" +
 "/web:form[@name='SWEForm0']" +
 "/web:select[(@name='s_pdq')]");
System.out.println("PDQ value is "+value);

functionLib.pdqClassName

Gets the class name of the target HTML element defined by the path.

Format

The functionLib.pdqClassName method has the following command format(s):

functionLib.pdqClassName(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

a String class specified PDQ object.

Example

Gets the class attribute of the PDQ object and prints the custom message.

//Using Java variable.
String PDQclassname = functionLib.pdqClassName("/web:window" +
 "/web:document" +
 "/web:form[@name='SWEForm0']" +
 "/web:select[(@name='s_pdq')]");
System.out.println("PDQ classname is "+PDQclassname );

functionLib.pdqGetROProperty

Gets the specified attribute (Property) of the target HTML element defined by the path.

Format

The functionLib.pdqGetROProperty method has the following command format(s):

functionLib.pdqGetROProperty(xpath, propertyName);

Command Parameters

xpath

a String specifying the object path.

propertyName

a String specifying the property (for example, rn, un, text) to get.

Throws

Exception

on any error.

Returns

the current value of the test object property from the object in the application.

Example

Gets the text value of the PDQ element with the attribute text and prints the custom message.

//Using Java variable.
String value = functionLib.pdqGetROProperty("/web:window[]" +
 "/web:document[]" +
 "/web:form[]" +
 "/web:select[(@name='s_pdq') " +
  "and multiple mod 'False']", "text"); 
System.out.println("PDQ text is "+value);

functionLib.pdqisExist

Detects whether or not the specified PDQ object exists.

Format

The functionLib.pdqisExist method has the following command format(s):

functionLib.pdqisExist(xpath, value);

Command Parameters

xpath

a String specifying the object path.

value

a String specifying the rn value.

Throws

Exception

on any error.

Returns

a boolean value indicating whether the specified object exists.

Example

Detects whether or not the specified object exists and prints the custom message.

//Using Java variable.
Boolean pdqexists = functionLib.pdqisExist("/web:window" +
 "/web:document" +
 "/web:form[@name='SWEForm0']" +
 "/web:select[(@name='s_pdq')]", "");
if (pdqexists)
{
 System.out.println("PDQ object exists");
}
else
{
 System.out.println("PDQ object does not exist");
}

functionLib.pdqItemCount

Detects the number of objects of a given type that are present in the current context.

Format

The functionLib.pdqItemCount method has the following command format(s):

functionLib.pdqItemCount(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

an Integer of the number of objects present in the current context.

Example

Gets the number of objects in the current context of the PDQ object and prints the custom message.

//Using Java variable.
int items = functionLib.pdqItemCount("/web:window" +
 "/web:document" +
 "/web:form[@name='SWEForm0']" +
 "/web:select[(@name='s_pdq')]");
System.out.println("PDQ items count is "+items);

functionLib.pdqRepositoryName

Gets the rn attribute of the target HTML element defined by the xpath.

Format

The functionLib.pdqRepositoryName method has the following command format(s):

functionLib.pdqRepositoryName(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

a String repository name of the specified object.

Example

Gets the rn attribute of the PDQ object and prints the custom message.

//Using Java variable.
String pdqRP =  functionLib.pdqRepositoryName("/web:window" +
 "/web:document" +
 "/web:form[@name='SWEForm0']" +
 "/web:select[(@name='s_pdq')]");
if(pdqRP.equals("Health"))
{
 System.out.println("Pass");
}
else
{
 System.out.println("Fail");
}

functionLib.pdqUiName

Gets the un attribute of the target HTML element defined by the xpath.

Format

The functionLib.pdqUiName method has the following command format(s):

functionLib.pdqUiName(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

a String UI name of the PDQ object.

Example

Gets the un attribute of the PDQ object and prints the custom message.

//Using Java variable.
String pdqUI = functionLib.pdqUiName("/web:window" +
 "/web:document" +
 "/web:form[@name='SWEForm0']" +
 "/web:select[(@name='s_pdq')]");
if(pdqUI.equals("Health"))
{
 System.out.println("Pass");
}
else
{
 System.out.println("Fail");
}

picklist_GetroProperty

The picklist_GetroProperty enum has the following values:

Table 20-15 List of picklist_GetroProperty Values

Value Description

classname

The picklist classname attribute.

rn

The picklist rn (Repository Name) attribute.

un

The picklist un ( UI Name) attribute.

value

The picklist value attribute.


functionLib.pickListActiveItem

Gets the value representing the currently selected item from the Picklist.

This Function should be used only for Form Applets.

Format

The functionLib.pickListActiveItem method has the following command format(s):

functionLib.pickListActiveItem(xpath);

functionLib.pickListActiveItem(xpath, row);

Command Parameters

xpath

a String specifying the object path should be taken from the specified column header from the List Applet.

row

an Integer value specifying the row number from the List Applet (should always start from one).

Throws

Exception

on any error.

Returns

a String value specifying the data of the currently selected item for the Picklist.

Example

Gets the value with specified row (2) from the Picklist object and prints the custom message.

//Using Java variable.
String value = functionLib.pickListActiveItem("/web:window" +
 "/web:document" +
 "/web:div[@rn='Priority' and @ot='JComboBox' " +
  "and @un='Priority']", 2); 
if(value.equals("medium"))
{
 System.out.println("Pass");
}
else
{
 System.out.println("Fail");
}

functionLib.pickListClassName

Gets the class attribute of the target HTML element defined by the xpath.

Common for both Form and List Applet objects.

Format

The functionLib.pickListClassName method has the following command format(s):

functionLib.pickListClassName(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

a String class name of the picklist object.

Example

Gets the UI name of the picklist object and prints the custom message.

//Using Java variable.
String classname = functionLib.pickListClassName("/web:window" +
 "/web:document" +
 "/web:form[@name='SWEForm2_0']" +
 "/web:input_text[@rn='State' and @ot='JComboBox' " +
  "and @un='State']");
System.out.println("Class name is "+classname);

functionLib.pickListCount

Gets the number of items are present in the Picklist object for the List Applet.

This functions should be used only for the List Applet.

Format

The functionLib.pickListCount method has the following command format(s):

functionLib.pickListCount(xpath);

functionLib.pickListCount(xpath, row);

Command Parameters

xpath

a String specifying the object path.

row

an Integer specifying the row number from the List Applet (should always start from one) .

Throws

Exception

on any error.

Returns

an Integer value, sepcifying the number of items are present in the Picklist object.

Example

Gets the number of items of the Picklist object for the Form Applet and prints the custom message.

//Using Java variable.
int number = functionLib.pickListCount("/web:window" +
 "/web:document" +
 "/web:input_text[@rn='Status' and @ot='JComboBox' " +
  "and @un='Status']", 2);
System.out.println("Number of items is "+number );

functionLib.pickListGetROProperty

Gets the specfied attribute (rn, un, classname, value) of the target HTML element defined by the path.

This function should be used only for List Applet objects.

Format

The functionLib.pickListGetROProperty method has the following command format(s):

functionLib.pickListGetROProperty(xpath, propertyname);

functionLib.pickListGetROProperty(columnxpath, propertyname, row);

Command Parameters

xpath

a String specifying the object path.

propertyname

a String specifying the property(for example, rn, un, classname, value) to get.

columnxpath

a String specifying the column path.

row

an Integer specifying the row number from the List Applet (should always start from one).

Throws

Exception

on any error.

Returns

a String value of the specified property.

Example

Gets the value of the picklist element with the attribute value and prints the custom message.

String getAttribute13 = functionLib.pickListGetROProperty("/web:window" +
 "/web:document" +
 "/web:input_text[@rn='State' and @ot='JComboBox' " +
  "and @un='State']", "value" , 2);  
if(getAttribute13.equals("CA"))
{
 System.out.println("Pass");
}
else
{
 System.out.println("Fail");
}

functionLib.pickListIsEnabled

Detects whether the PickList object is enabled or disabled.

This function should be used only for List Applets.

Format

The functionLib.pickListIsEnabled method has the following command format(s):

functionLib.pickListIsEnabled(xpath);

functionLib.pickListIsEnabled(xpath, row);

Command Parameters

xpath

a String specifying the object path.

row

an Integer specifying the row number from the List Applet (should always start from one).

Throws

Exception

on any error.

Returns

true if the object is enabled, false if the object is disabled.

Example

Detects whether the PickList object is enabled or disabled and prints a custom message based on whether PickList object is enabled or disabled.

//Using Java variable.
boolean pklst = functionLib.pickListIsEnabled("/web:window" +
 "/web:document" +
 "/web:div[@rn='Primary Revenue Class' and @ot='JComboBox' " +
  "and @un='Revenue Class']", 5);
if(pklst)
{
 System.out.println("Enabled");
}
else
{
 System.out.println("Disabled");
}

functionLib.picklistItemIsExist

Detects the existence of the Picklist item in the given LOV list.

Format

The functionLib.picklistItemIsExist method has the following command format(s):

functionLib.picklistItemIsExist(xpath, ItemName);

functionLib.picklistItemIsExist(xpath, ItemName, row);

Command Parameters

xpath

a String specifying the object path.

ItemName

a String to be checked for the existence.

row

an Integer specifying the row number from the List Applet (should always start from one).

Throws

Exception

on any error.

Returns

true if the item exists, false if the item does not exist.

Example

Detects the existence of the Picklist item in the given LOV list.

//Using Java variable.
boolean value = functionLib.picklistItemIsExist("/web:window" +
 "/web:document" +
 "/web:input_text[@rn='Status' and @ot='JComboBox' " +
 "and @un='Status']", "Open", 5);
if(value)
{
 System.out.println("Exists");
}
else
{
 System.out.println("Does Not exist");
}

functionLib.pickListRepositoryName

Gets the rn attribute of the target HTML element defined by the xpath.

Common for both Form and List Applet objects.

Format

The functionLib.pickListRepositoryName method has the following command format(s):

functionLib.pickListRepositoryName(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

a String repository name of the picklist object.

Example

Gets the repository name of the picklist object and prints the custom message.

//Using Java variable.
String pickRP = functionLib.pickListRepositoryName("/web:window" +
 "/web:document" +
 "/web:form[@name='SWEForm2_0']" +
 "/web:input_text[@rn='State' and @ot='JComboBox' " +
 "and @un='State']");
if(pickRP.equals("some repository name"))
{
 System.out.println("Pass");
}
else
{
 System.out.println("Fail");
}

functionLib.pickListSetText

Set text to target Picklist element.

This function should be used only for the List Applet.

Format

The functionLib.pickListSetText method has the following command format(s):

functionLib.pickListSetText(xpath, value);

functionLib.pickListSetText(xpath, value, row);

Command Parameters

xpath

a String specifying the object path.

value

a text to set in to the picklist object.

row

an Integer specifying the row.

Throws

Exception

on any error.

Example

Clicks and enters the text "medium" into picklist object.

functionLib.pickListSetText("/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']", "medium", 2);

functionLib.pickListUIName

Gets the un attribute of the target HTML element defined by the xpath.

Common for both Form and List Applet objects.

Format

The functionLib.pickListUIName method has the following command format(s):

functionLib.pickListUIName(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

a String UI name of the picklist object.

Example

Gets the UI name of the picklist object and prints the custom message.

//Using Java variable.
String pickUI = functionLib.pickListUIName("/web:window" +
 "/web:document" +
 "/web:form[@name='SWEForm2_0']" +
 "/web:input_text[@rn='State' and @ot='JComboBox' " +
 "and @un='State']");
if(pickUI.equals("State"))
{
 System.out.println("Pass");
}
else
{
 System.out.println("Fail");
}

functionLib.Previousmonth

Gets the number of the previous month.

Format

The functionLib.Previousmonth method has the following command format(s):

functionLib.Previousmonth(val);

Command Parameters

val

an Integer specifying the current month number.

Returns

an Integer of the month number.

Example

Gets the number of the previous month.

int curMonth = functionLib.getMonthNumber("Dec");
int prevmonth = functionLib.Previousmonth(curMonth);
System.out.println("Previous month is "+prevmonth );

functionLib.PreviousPage

Go to the previous page of the specified Applet.

Format

The functionLib.PreviousPage method has the following command format(s):

functionLib.PreviousPage(Rn_Applet);

Command Parameters

Rn_Applet

a String specifying the Applet.

Throws

Exception

on any error.

Example

Go to the previous page of the specified Applet.

functionLib.PreviousPage("Rn Applet");

functionLib.recordCount

Specifies the number of rows (visible/invisible) in the List Applet.

Format

The functionLib.recordCount method has the following command format(s):

functionLib.recordCount( );

Throws

Exception

on any error.

Returns

a integer number of rows.

Example

Gets the record count of the list applet and prints the custom message.

{
//Using Java variable. 
int rows = functionLib.recordCount();
 System.out.println(rows);
}

functionLib.rowCount

Gets the number of currently visible rows (determined by show more/less).

Format

The functionLib.rowCount method has the following command format(s):

functionLib.rowCount(xpath);

Command Parameters

xpath

a String specifying the object path should be taken from the any column header from the List Applet.

Throws

Exception

on any error.

Returns

an Integer number of currently visible rows.

Example

Gets the row count of the List Applet and prints the custom message.

//Using Java variable.
int rows = functionLib.rowCount("/web:window" +
 "/web:document" +
 "/web:div[@rn='Account' and @ot='JText' " +
  "and @un='Account']");
for(int i = 1; i< rows ; i++)
{
 System.out.println("Record number "+ i );
}

functionLib.screenClassName

Gets the classname attribute of the screen.

Format

The functionLib.screenClassName method has the following command format(s):

functionLib.screenClassName( );

Throws

Exception

on any error.

Returns

a String classname of the screen object.

Example

Gets the classname of the screen and prints the custom message.

//Using Java variable.
String value = functionLib.screenClassName();
System.out.println("classname of the screen is "+value);

functionLib.screenCount

Gets the screen count present in the current context.

Format

The functionLib.screenCount method has the following command format(s):

functionLib.screenCount( );

Throws

Exception

on any error.

Returns

an Integer value of the screen count.

Example

Gets the number of screens present in the current context and prints the custom message.

//Using Java variable.
int count = functionLib.screenCount();
System.out.println("Count is "+count);

functionLib.screenGetRepositoryName

Gets the rn attribute of the target HTML element defined by the xpath.

Format

The functionLib.screenGetRepositoryName method has the following command format(s):

functionLib.screenGetRepositoryName(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

the String value of the specified property.

Example

Gets the rn attribute of the screen.

//Using Java variable.
String screenName  = functionLib.screenGetRepositoryName("/web:window" +
 "/web:document" +
 "/web:a[@text='Accounts']");
System.out.println("Screen name is "+screenName);

functionLib.screenGetRoProperty

Gets the propertyname attribute of the target HTML element defined by the path.

Format

The functionLib.screenGetRoProperty method has the following command format(s):

functionLib.screenGetRoProperty(propertyName);

Command Parameters

propertyName

a String specifying the property (for example, un, classname, rn) to get.

Throws

Exception

on any error.

Returns

the current value of the object property from the object in the application.

Example

Gets the classname attribute of the screen element and prints the custom message.

//Using Java variable.
String value = functionLib.screenGetRoProperty("classname");
System.out.println("classname of the screen is "+value);

functionLib.screenRepositoryName

Gets the rn attribute of the screen.

Format

The functionLib.screenRepositoryName method has the following command format(s):

functionLib.screenRepositoryName( );

Throws

Exception

on any error.

Returns

a String repository name of the screen object.

Example

Gets the rn attribute of the screen and prints the custom message.

//Using Java variable.
String sName = functionLib.screenRepositoryName();
if(sName.equals("Accounts"))
{
 System.out.println("Pass");
}
else
{
 System.out.println("Fail");
}

functionLib.screenUiName

Gets the un attribute of the screen.

Format

The functionLib.screenUiName method has the following command format(s):

functionLib.screenUiName( );

Throws

Exception

on any error.

Returns

a String UI name of the screen object.

Example

Gets the un attribute of the screen and prints the custom message.

//Using Java variable.
String sName = functionLib.screenUiName();
if(sName.equals("Accounts"))
{
 System.out.println("Pass");
}
else
{
 System.out.println("Fail");
}

functionLib.selectCell

Clicks on the element inside the specified cell.

Format

The functionLib.selectCell method has the following command format(s):

functionLib.selectCell(xpath, row);

Command Parameters

xpath

a String specifying the object path should be taken from the specified column header from the List Applet..

row

an Integer specifying the row number from the List Applet (should always start from one).

Throws

Exception

on any error.

Example

Gets the rows count of the List Applet, loops, and selects the cell for all the rows.

//Using Java variable.
int rows = functionLib.rowCount("/web:window" +
 "/web:document" +
 "/web:div[@rn='Type' and @ot='JComboBox' " +
  "and @un='Account Type']");
for(int i = 1; i< rows ; i++)
{
 functionLib.selectCell("/web:window" +
  "/web:document" +
  "/web:div[@rn='Type' and @ot='JComboBox' " +
   "and @un='Account Type']", i );
}

functionLib.selectTree

Selects the tree object specified by String ID.

Format

The functionLib.selectTree method has the following command format(s):

functionLib.selectTree(StrId);

Command Parameters

StrId

a String specifying the String ID.

Throws

Exception

on any error.

Example

Selects the tree object specified by String ID.

functionLib.selectTree("stringid");

functionLib.SetCellData

Sets the value of the input in the specified cell.

Format

The functionLib.SetCellData method has the following command format(s):

functionLib.SetCellData(xpath, row, value);

Command Parameters

xpath

a String specifying the object path should be taken from the specified column header from the List Applet.

row

an Integer specifying the row number from the List Applet (should always start from one).

value

a String to be set.

Throws

Exception

on any error.

Returns

a String specifying the text for a specified cell.

Example

Sets the value of the input in the specified cell.

//Using Java variable.
int rows = functionLib.rowCount("/web:window" +
 "/web:document" +
 "/web:div[@rn='Type' and @ot='JComboBox' " +
  "and @un='Account Type']") ;
for(int i = 1; i< rows ; i++)
{
 functionLib.SetCellData("/web:window" +
  "/web:document" +
  "/web:div[@rn='Type' and @ot='JComboBox' " +
   "and @un='Account Type']", i, "Commercial");
}

functionLib.SetText

he text when the field has same repository name across multiple applets in same screen and modifies or renames the text in the text

Format

The functionLib.SetText method has the following command format(s):

functionLib.SetText(xpath, value);

functionLib.SetText(xpath, value, row);

functionLib.SetText(xpath, value, row, AppletRepName);

Command Parameters

xpath

a String specifying the object path should be taken from the specified column header from the List Applet.

value

a String to be set.

row

an Integer specifying the row number from the List Applet (should always start from one).

AppletRepName

a String specifying the repository name of the Applet.

Throws

Exception

on any error.

Returns

a String specifying the text for a specified cell.

Example

Gets the rows count of the List Applet, loops and sets the Text for all the rows with a specified columns.

//Using Java variable.
int rows = functionLib.rowCount("/web:window" +
 "/web:document" +
 "/web:div[@rn='Name' and @ot='JText']");
for(int i = 1; i< rows ; i++)
{
 functionLib.SetText("/web:window" +
  "/web:document" +
  "/web:div[@rn='Description' and @ot='JText']",
  "Commercial", i,"SM Social Media Admin Services Applet" );
}
 

functionLib.setTextArea

Sets text to the specified cell (textarea) in the list.

Format

The functionLib.setTextArea method has the following command format(s):

functionLib.setTextArea(xpath, value, row);

Command Parameters

xpath

a String specifying the object path. Should be taken from the specified column header from the List Applet.

value

a String to be set.

row

an integer specifying the row number from the List Applet (should always start from one).

Throws

Exception

on any error.

Example

Gets the rows count of the List applet, loops and sets the text for all the rows with the specified columns.

int rows = functionLib.rowCount("/web:window" +
 "/web:document" +
 "/web:div[@rn='Description' " +
  "and @ot='JTextArea']") ;
for(int i = 1; i< rows ; i++)
{
 functionLib.setTextArea("/web:window" +
  "/web:document" +
  "/web:div[@rn='Description' " +
   "and @ot='JTextArea']","Commercial", i ); 
}

functionLib.siebScreenActiveView

Gets the rn attribute of the target HTML element.

Format

The functionLib.siebScreenActiveView method has the following command format(s):

functionLib.siebScreenActiveView( );

Throws

Exception

on any error.

Returns

the view name of the screen in context.

Example

Gets the rn attribute and prints the custom message.

//Using Java variable.
String view = functionLib.siebScreenActiveView(); 
System.out.println("Active view is "+view);

functionLib.siebScreenViewsIsExists

Detects whether the specified view exists or not.

Format

The functionLib.siebScreenViewsIsExists method has the following command format(s):

functionLib.siebScreenViewsIsExists(RepositoryName, siebScreenViewsLevel);

Command Parameters

RepositoryName

a String specifying the object repository name.

siebScreenViewsLevel

a String specifying the level of the view for example, L2, L3 and L4.

Throws

Exception

on any error.

Returns

String true if the view exists else return false if the view does not exist.

Example

Detects whether the view specified by RepositoryName and siebScreenViewsLevel with the attribute rn exists or not and prints the custom message.

//Using Java variable.
String value = functionLib.siebScreenViewsIsExists("Account Detail - Activities View", "L3"); 
System.out.println("The Required view exist is "+value);
if(value.equals("true")) 
{
 System.out.println("Required view exists");
}
else
{
 System.out.println("Required view does not exist"); 
}

siebScreenViewsValue

The siebScreenViewsValue enum has the following values:

Table 20-16 List of siebScreenViewsValue Values

Value Description

L2

Screen view L2 (level 2) value.

L3

Screen view L3 (level 3) value.

L4

Screen view L4 (level 4) value.


functionLib.sitemapFilterTextIsExists

Detects whether or not the filtered count for the entered text is displayed on the sitemap screen on sitemap search operation.

Format

The functionLib.sitemapFilterTextIsExists method has the following command format(s):

functionLib.sitemapFilterTextIsExists( );

Throws

Exception

on any error.

Returns

String true if the filtered text count is displayed on the sitemap on performing sitemap search else returns false if the text is not displayed.

Example

Detects whether or not the filtered count for the entered text is displayed on the sitemap screen.

//Using Java variable.
web.textBox(17,"/web:window" +
 "/web:document" +
 "/web:input_text[@id='sitemapFilterInput']")
 .click(); 
ft.typeCharacters("Activities");
String sitemapfiltertextIsExists = functionLib.sitemapFilterTextIsExists();
if (sitemapfiltertextIsExists.equals("true"))
{
 System.out.println("Exists");
}
else
{
 System.out.println("Does not exist");
}

functionLib.sitemapIsExists

Detects whether or not the sitemap screen is displayed on click of sitemap icon.

Format

The functionLib.sitemapIsExists method has the following command format(s):

functionLib.sitemapIsExists( );

Throws

Exception

on any error.

Returns

String true if the search box field is present in the sitemap screen else returns false if the sitemap screen does not exist.

Example

Detects whether or not the sitemap screen is displayed on click of sitemap icon.

//Using Java variable.
web.image(15,"/web:window" +
 "/web:document" +
 "/web:img[@src='/images/icon_sitemap_1.gif']")
 .click();               
String sitemapscreenisexists = functionLib.sitemapIsExists();
if (sitemapscreenisexists.equals("true"))
{
 System.out.println("Exists");
}
else
{
 System.out.println("Does not exist");
}

functionLib.sitemapLinkclick

Clicks on the link available on the Sitemap screen.

Format

The functionLib.sitemapLinkclick method has the following command format(s):

functionLib.sitemapLinkclick(rn);

Command Parameters

rn

a String specifying the rn value of the screen.

Throws

Exception

on any error.

Example

Clicks on the particular link available on the sitemap screen.

functionLib.sitemapLinkclick("Sitemap.Accounts Screen");

functionLib.sitemapScreen2ndLevelViewCount

Gets the number of 2nd level views present for a particular screen.

Format

The functionLib.sitemapScreen2ndLevelViewCount method has the following command format(s):

functionLib.sitemapScreen2ndLevelViewCount(xpath);

Command Parameters

xpath

a String specifying the xpath of the screen in the sitemap for which the number of second level views is to be retrieved.

Throws

Exception

on any error.

Returns

a String : count of the second level view links for a particular screen in the sitemap.

Example

Gets the number of 2nd level views present for the Activities screen.

//Using Java variable.
String Level2Views = functionLib.sitemapScreen2ndLevelViewCount("//web:a[@rn='Sitemap.Activities Screen' " +
 "and @ot='SiebWebSitemapScreen' or @un='Activities']");
int secondLeveldviewcount = Integer.parseInt(Level2Views);       
System.out.println("View count is "+secondLeveldviewcount);

functionLib.sitemapScreen3rdLevelViewCount

Gets the number of 3rd level views present for a particular screen.

Format

The functionLib.sitemapScreen3rdLevelViewCount method has the following command format(s):

functionLib.sitemapScreen3rdLevelViewCount(xpath);

Command Parameters

xpath

a String specifying the xpath of the screen in the sitemap for which the number of third level views is to be retrieved.

Throws

Exception

on any error.

Returns

a String : count of the third level view links for a particular screen in sitemap.

Example

Gets the number of 3rd level views present for the Activities screen.

//Using Java variable.
String Level3Views = functionLib.sitemapScreen3rdLevelViewCount("//web:a[@rn='Sitemap.Activities Screen' " +
 "and @ot='SiebWebSitemapScreen' or @un='Activities']");
int thirdLeveldviewcount = Integer.parseInt(Level3Views);
System.out.println("View count is "+thirdLeveldviewcount);

functionLib.sitemapScreen4thLevelViewCount

Gets the number of 4th level views present for a particular screen.

Format

The functionLib.sitemapScreen4thLevelViewCount method has the following command format(s):

functionLib.sitemapScreen4thLevelViewCount(xpath);

Command Parameters

xpath

a String specifying the xpath of the screen in the sitemap for which the number of fourth level views is to be retrieved.

Throws

Exception

on any error.

Returns

a String : count of the fourth level view links for a particular screen in sitemap.

Example

Gets the number of 4th level views present for the Activities screen.

//Using Java variable.
String Level4Views = functionLib.sitemapScreen4thLevelViewCount("//web:a[@rn='Sitemap.Accounts Screen' " +
 "and @ot='SiebWebSitemapScreen' or @un='Accounts']");
int fourthLeveldviewcount = Integer.parseInt(Level4Views);
System.out.println("View count is "+fourthLeveldviewcount);

functionLib.sitemapSearchBoxCount

Gets the count of the number of occurrences of the specified text in the sitemap search box.

Format

The functionLib.sitemapSearchBoxCount method has the following command format(s):

functionLib.sitemapSearchBoxCount( );

Throws

Exception

on any error.

Returns

Count of the filtered text entered in the search box.

Example

Gets the count of the number of occurrences of the specified text in the sitemap search box.

//Using Java variable.
web.textBox(17,"/web:window" +
 "/web:document" +
 "/web:input_text[@id='sitemapFilterInput']")
 .click();               
ft.typeCharacters("Activities"); 
String sitemapsearchboxCount = functionLib.sitemapSearchBoxCount();
System.out.println("Search box count is "+sitemapsearchboxCount);

functionLib.sitemapSearchBoxIsExists

Detects whether or not the searchbox field exists in the sitemap screen.

Format

The functionLib.sitemapSearchBoxIsExists method has the following command format(s):

functionLib.sitemapSearchBoxIsExists( );

Throws

Exception

on any error.

Returns

String true if the search box field is present in the sitemap screen else returns false if the search box field is not present.

Example

Detects whether or not the searchbox field exists in the sitemap screen.

//Using Java variable.
web.image(15,"/web:window" +
 "/web:document" +
 "/web:img[@src='/images/icon_sitemap_1.gif']")
 .click();               
String sitemapSearchBoxIsExists = functionLib.sitemapSearchBoxIsExists();
if (sitemapSearchBoxIsExists.equals("true"))
{
 System.out.println("Exists");
}
else
{
 System.out.println("Does not exist");
}

functionLib.sortDown

Sorts the table in descending order based on the contents of the specified column.

Format

The functionLib.sortDown method has the following command format(s):

functionLib.sortDown(xpath);

Command Parameters

xpath

a String specifying the object path. Should be taken from the specified column header from the List Applet.

Throws

Exception

on any error.

Example

Sorts the table in descending order.

functionLib.sortDown("/web:window" +
 "/web:document" +
 "/web:div[@rn='Type' and @ot='JComboBox' " +
  "and @un='Account Type']");

functionLib.sortUp

Sorts the table in ascending order based on the contents of the specified column.

Format

The functionLib.sortUp method has the following command format(s):

functionLib.sortUp(xpath);

Command Parameters

xpath

a String specifying the object path. Should be taken from the specified column header from the List Applet.

Throws

Exception

on any error.

Example

Sorts the table in ascending order.

functionLib.sortUp("/web:window" +
 "/web:document" +
 "/web:div[@rn='Type' and @ot='JComboBox' " +
  "and @un='Account Type']" );

functionLib.Static

Gets the specified attribute (Property) of the target HTML element defined by the path.

Format

The functionLib.Static method has the following command format(s):

functionLib.Static(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

the text attribute value for the dialog pop-up.

Example

Gets the text attribute value for the dialog pop-up object element and prints the custom message.

//Using Java variable.
String value = functionLib.Static("/web:dialog_confirm[]" +
 "/web:accStaticText[@name='Are you sure you want to delete the selected " +
  "record in 'Opportunities'?']"); 
System.out.println("Text attribute value for the dialog pop-up is "+value);

functionLib.staticDialogGetROProperty

Gets the specified attribute (Property) of the target HTML element defined by the path.

Format

The functionLib.staticDialogGetROProperty method has the following command format(s):

functionLib.staticDialogGetROProperty(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

the text attribute value for the dialog pop-up.

Example

Gets the text attribute value for the dialog pop-up object element and prints the custom message.

//Using Java variable.
String value = functionLib.staticDialogGetROProperty("/web:dialog_confirm[]" +
 "/web:accStaticText[@name='Are you sure you want to delete the selected " +
  "record in 'Opportunities'?']"); 
System.out.println("Text attribute value for the dialog pop-up is "+value);

functionLib.staticDialogGetVisibleText

Gets the text attribute of the Confirm or Alert dialog box, if one exists.

Format

The functionLib.staticDialogGetVisibleText method has the following command format(s):

functionLib.staticDialogGetVisibleText( );

functionLib.staticDialogGetVisibleText(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

a String of the dialog text.

Example

Gets the text attribute value for the dialog pop-up and prints the custom message.

//Using Java variable.
String value = functionLib.staticDialogGetVisibleText("/web:dialog_confirm[]" +
 "/web:accDialog[@name='Message from webpage']"); 
System.out.println("Dialog pop-up text is "+value);

functionLib.textAreaClassName

Gets the class attribute of the target HTML element defined by the xpath.

This function should be used for both List and Form Applets.

Format

The functionLib.textAreaClassName method has the following command format(s):

functionLib.textAreaClassName(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

a String class name of the Textarea object.

Example

Gets the class name of the Textarea object and prints the custom message.

//Using Java variable.
String Textarea = functionLib.textAreaClassName("/web:window" +
 "/web:document" +
 "/web:div[@rn='Abstract' and @ot='JTextArea' " +
  "and @un='Summary']");
System.out.println("class name is "+Textarea);

functionLib.textAreaGetROProperty

Gets the specfied attribute (rn, un, classname, value) of the target HTML element defined by the path.

This function should be used only for Form Applet objects.

Format

The functionLib.textAreaGetROProperty method has the following command format(s):

functionLib.textAreaGetROProperty(xpath, propertyname);

functionLib.textAreaGetROProperty(xpath, propertyname, row);

Command Parameters

xpath

a String specifying the object path should be taken from the specified column header from the List Applet.

propertyname

a String specifying the property (for example, rn, un, classname, value) to get.

row

integer specifying the row number from the List Applet (should always start from one).

Throws

Exception

on any error.

Returns

a String value of the specified property.

Example

Gets the value of the Text Area element with the attribute value and prints the custom message if it matches the required value.

//Using Java variable.
String getAttribute = functionLib.textAreaGetROProperty("/web:window" +
 "/web:document" +
 "/web:div[@rn='Abstract' and @ot='JTextArea' " +
  "and @un='Summary']", "value");
if(getAttribute.equals("some discription"))
{
 System.out.println("Pass");
}
else
{
 System.out.println("Fail");
}

functionLib.textareaIsEnabled

Detects whether the Textarea object is enabled or disabled.

This function should be used only for Form Applets.

Format

The functionLib.textareaIsEnabled method has the following command format(s):

functionLib.textareaIsEnabled(xpath);

functionLib.textareaIsEnabled(xpath, row);

Command Parameters

xpath

a String specifying the object path.

row

an integer specifying the row number.

Throws

Exception

on any error.

Returns

true if the object is enabled, false if the object is disabled.

Example

Detects whether the Textarea object is enabled or disabled and prints a custom message.

//Using Java variable.
boolean Textarea = functionLib.textareaIsEnabled("/web:window" +
 "/web:document" +
 "/web:div[@rn='Abstract' and @ot='JTextArea' " +
  "and @un='Summary']", 1);
if(Textarea)
{
 System.out.println("Pass");
}
else
{
 System.out.println("Fail");
} 

functionLib.textAreaRepositoryName

Gets the rn attribute of the target HTML element defined by the xpath.

This function should be used for both List and Form Applet.

Format

The functionLib.textAreaRepositoryName method has the following command format(s):

functionLib.textAreaRepositoryName(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

a String repository name of the Textarea object.

Example

Gets the repository name of the Textarea object and prints the custom message.

//Using Java variable.
String Textarea = functionLib.textAreaRepositoryName("/web:window" +
 "/web:document" +
 "/web:div[@rn='Abstract' and @ot='JTextArea' " +
  "and @un='Summary']");
 System.out.println("Repository name is "+Textarea);

functionLib.textAreaText

Gets the text value of the target HTML element defined by the xpath.

This Function should be used only for Form Applets.

Format

The functionLib.textAreaText method has the following command format(s):

functionLib.textAreaText(xpath);

functionLib.textAreaText(xpath, row);

Command Parameters

xpath

a String specifying the object path should be taken from the specified column header from the List Applet.

row

an Integer value specifying the row number from the List Applet (should always start from one).

Throws

Exception

on any error.

Returns

a String value specifying the text of the object.

Example

Gets the text value from the object for the second row of the List Applet and prints the custom message.

//Using Java variable.
String value = functionLib.textAreaText("/web:window" +
 "/web:document" +
 "/web:div[@rn='Abstract' and @ot='JTextArea' " +
  "and @un='Summary']", 2);
if(value.equals("some description"))
{
 System.out.println("Pass");
}
else
{
 System.out.println("Fail");
}

functionLib.textAreaUiName

Gets the un attribute of the target HTML element defined by the xpath.

This function should be used for both List and Form Applet.

Format

The functionLib.textAreaUiName method has the following command format(s):

functionLib.textAreaUiName(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

a String UI name of the Textarea object.

Example

Gets the UI name of the Textarea object and prints the custom message.

//Using Java variable.
String Textarea = functionLib.textAreaUiName("/web:window" +
 "/web:document" +
 "/web:div[@rn='Abstract' and @ot='JTextArea' " +
  "and @un='Summary']");
 System.out.println("Repository name is "+Textarea);

functionLib.textClassName

Gets the class attribute of the target HTML element defined by the xpath.

Format

The functionLib.textClassName method has the following command format(s):

functionLib.textClassName(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

a String class name of the Text object.

Example

Gets the class name of the text object and prints the custom message.

//Using Java variable.
String name = functionLib.textClassName("/web:window" +
 "/web:document" +
 "/web:div[@rn='Name' and @ot='JText' " +
 "and @un='Opportunity Name']");
System.out.println("Class name is "+name);

functionLib.textGetROProperty

Gets the specfied attribute (text, un, rn, classname, isenabled) of the target HTML element defined by the path.

This function should be used only for List Applet objects.

Format

The functionLib.textGetROProperty method has the following command format(s):

functionLib.textGetROProperty(xpath, propertyname);

functionLib.textGetROProperty(xpath, propertyname, row);

Command Parameters

xpath

a String specifying the object path should be taken from the specified column header from the List Applet.

propertyname

a String specifying the property (for example, text, un, rn, classname, isenabled) to get.

row

an Integer specifying the row number from the List Applet (should always start from one).

Throws

Exception

on any error.

Returns

a String value of the specified property.

Example

Gets the value of the text element with the attribute text and prints the custom message if matches the required value.

//Using Java variable.
String getAttribute = functionLib.textGetROProperty("/web:window" +
 "/web:document" +
 "/web:div[@rn='Name' and @ot='JText' " +
  "and @un='Name']", "text", 2 );    
if(getAttribute.equals("SAM"))
{
 System.out.println("Pass");
}
else
{
 System.out.println("Fail");
}

functionLib.textIsEnabled

Detects whether the Text object is enabled or disabled from the target HTML element defined by the xpath.

This function should be used only for List Applets.

Format

The functionLib.textIsEnabled method has the following command format(s):

functionLib.textIsEnabled(xpath);

functionLib.textIsEnabled(xpath, row);

Command Parameters

xpath

a String specifying the object path.

row

an Integer specifying the row number from the List Applet (should always start from one).

Throws

Exception

on any error.

Returns

true if the object is enabled, false if the object is disabled.

Example

Detects whether the Text object is enabled or disabled for the fifth row of the List Applet and prints a custom message based on whether Text object is enabled or disabled.

//Using Java variable.
boolean text = functionLib.textIsEnabled("/web:window" +
 "/web:document" +
 "/web:div[@rn='Contact Last Name' and @ot='JText' " +
  "and @un='Last Name']", 5);
if(text)
{
 System.out.println("Enabled");
}
else
{
 System.out.println("Disabled");
}

functionLib.textPopupType

Detects the type of popup associated with the textbox from the target HTML element defined by the xpath.

This function should be used only for List Applets.

Format

The functionLib.textPopupType method has the following command format(s):

functionLib.textPopupType(xpath);

functionLib.textPopupType(xpath, row);

Command Parameters

xpath

a String specifying the object path.

row

an integer specifying the row number from the List Applet (should always start from one).

Throws

Exception

on any error.

Returns

a String 'MVPick' if the object is Popup type or 'Text' if the object is not a Popup type.

Example

Gets the type of popup associated with textbox for the second row of the List Applet and prints the custom message.

//Using Java variable.
String type1 = functionLib.textPopupType("/web:window" +
 "/web:document" +
 "/web:div[@rn='Contact Last Name' and @ot='JText' " +
  "and @un='Last Name']", 2);
if(type1.equals("MVPick"))
{
 System.out.println("MVPick");
}
else
{
 System.out.println("Text");
}

functionLib.textRepositoryName

Gets the rn attribute of the Text object of the target HTML element defined by the xpath.

This function should be used for both List and Form Applet.

Format

The functionLib.textRepositoryName method has the following command format(s):

functionLib.textRepositoryName(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

a String value of the rn attribute of the Text object.

Example

Gets the rn attribute of the Text object and prints the custom message.

//Using Java variable.
String textRN = functionLib.textRepositoryName("/web:window" +
 "/web:document" +
 "/web:input_text[@rn='Name' and @ot='JText' " +
  "and @un='Account Name']");
System.out.println("text repository name is "+textRN);

functionLib.textText

Gets the text value of the target HTML element defined by the xpath.

This Function should be used only for List Applets.

Format

The functionLib.textText method has the following command format(s):

functionLib.textText(xpath);

functionLib.textText(xpath, row);

Command Parameters

xpath

a String specifying the object path.

row

an Integer value specifying the row number from the List Applet (should always start from one).

Throws

Exception

on any error.

Returns

a String value specifying the text of the object.

Example

Gets the text value from the object for the second row of the List Applet and prints the custom message.

//Using Java variable.
String value20 = functionLib.textText("/web:window" +
 "/web:document" +
 "/web:div[@rn='Contact Last Name' and @ot='JText' " +
 "and @un='Last Name']", 2);
if(value20.equals("sam"))
{
 System.out.println("Pass");
}
else
{
 System.out.println("Fail");
}

functionLib.textUIName

Gets the un attribute of the Text object of the target HTML element defined by the xpath.

This function should be used for both List and Form Applet.

Format

The functionLib.textUIName method has the following command format(s):

functionLib.textUIName(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

a String un value specifying the Text object.

Example

Gets the un attribute of the Text object and prints the custom message.

//Using Java variable.
String textUN = functionLib.textUIName("/web:window" +
 "/web:document" +
 "/web:input_text[@rn='Name' and @ot='JText' " +
 "and @un='Account Name']");
System.out.println("text UI name is "+textUN);

functionLib.threadBarItemCount

Gets the number of objects of a given type that are present in the current context.

Format

The functionLib.threadBarItemCount method has the following command format(s):

functionLib.threadBarItemCount( );

Throws

Exception

on any error.

Returns

an Integer specifying the number of objects in the thread bar.

Example

Gets the thread bar item count.

//Using Java variable.
int count = functionLib.threadBarItemCount();
System.out.println("Item count is "+count);

functionLib.threadItems

Gets the threaditems attribute of the target HTML element defined by the path.

Format

The functionLib.threadItems method has the following command format(s):

functionLib.threadItems( );

Throws

Exception

on any error.

Returns

all the items present in the thread bar.

Example

Gets all the items present in thread bar and prints the custom message.

//Using Java variable.
String value = functionLib.threadItems();
System.out.println("Total Items present in the thead bar is "+value);

functionLib.toggleClick

Clicks on any span with repository name in the List or Form Applet.

Format

The functionLib.toggleClick method has the following command format(s):

functionLib.toggleClick(rn);

Command Parameters

rn

a String specifying the repository name.

Throws

Exception

on any error.

Example

Clicks the repository toggle of the span element.

functionLib.toggleClick("Accounts");

functionLib.toolbarClassName

Gets the specified attribute (classname) of the target HTML element defined by the path.

Format

The functionLib.toolbarClassName method has the following command format(s):

functionLib.toolbarClassName(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

the classname of the toobar object.

Example

Gets the classname of the toobar object and prints the custom message.

//Using Java variable.
String value = functionLib.toolbarClassName("/web:window[]" +
 "/web:document[]" +
 "/web:img[]"); 
System.out.println("Toolbar classname is "+value);

functionLib.toolBarCount

Gets the count attribute of the target HTML element defined by the path.

Format

The functionLib.toolBarCount method has the following command format(s):

functionLib.toolBarCount( );

Throws

Exception

on any error.

Returns

the number of objects of a given type that are present in the current context. The number of toolbar objects in the screen.

Example

Gets the number of toolbar objects in the screen and prints the custom message.

//Using Java variable.
int value = functionLib.toolBarCount(); 
System.out.println("Number of toolbar objects in the screen is "+value);

functionLib.toolbarItemIsEnabled

Detects whether a particular toolbar item is enabled on the target HTML element defined by the path.

Format

The functionLib.toolbarItemIsEnabled method has the following command format(s):

functionLib.toolbarItemIsEnabled(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

String true if a toolbar item is enabled else returns false if not enabled.

Example

Checks whether sitemap toolbar icon is enabled.

//Using Java variable.
String toolbarIsEnabled = functionLib.toolbarItemIsEnabled("/web:window" +
 "/web:document" +
 "/web:img[@src='/images/icon_sitemap_1.gif']");
if (toolbarIsEnabled.equals("true"))
{
 System.out.println("Enabled");
}
else
{
 System.out.println("Not enabled");
}

functionLib.viewAppletActiveApplet

Gets the activeapplet attribute of the Applet view object.

Format

The functionLib.viewAppletActiveApplet method has the following command format(s):

functionLib.viewAppletActiveApplet( );

Throws

Exception

on any error.

Returns

the RepositoryName of the active Applet view object.

Example

Gets the RepositoryName of the active Applet view object and prints the custom message.

//Using Java variable.
String value = functionLib.viewAppletActiveApplet();
System.out.println("active Applet view is "+value);

functionLib.viewAppletCount

Gets the appletcount attribute of the target HTML element defined by the path.

Format

The functionLib.viewAppletCount method has the following command format(s):

functionLib.viewAppletCount( );

Throws

Exception

on any error.

Returns

the number of Applets present in the current Screen.

Example

Gets the number of objects of a given type that are present in the current context and prints the custom message.

//Using Java variable.
int value = functionLib.viewAppletCount(); 
System.out.println("Number of Applets present in the current Screen is "+value);

functionLib.viewAppletGetRepositoryName

Gets the specified attribute (RepositoryName) of the target HTML element defined by the path.

Format

The functionLib.viewAppletGetRepositoryName method has the following command format(s):

functionLib.viewAppletGetRepositoryName(UIName);

Command Parameters

UIName

a String specifying the user interface name of the viewApplet.

Throws

Exception

on any error.

Returns

the RepositoryName of the viewApplet object.

Example

Gets the RepositoryName of the viewApplet object element and prints the custom message.

//Using Java variable.
String value = functionLib.viewAppletGetRepositoryName("Accounts");
System.out.println("viewApplet RepositoryName is "+value);

functionLib.viewAppletGetUiName

Gets the uiname attribute of the target HTML element defined by the path.

Format

The functionLib.viewAppletGetUiName method has the following command format(s):

functionLib.viewAppletGetUiName(AppRepName);

Command Parameters

AppRepName

a String specifying the Applet Repository Name.

Throws

Exception

on any error.

Returns

the UiName (display name in the user interface, i.e. the un attribute) of the viewApplet object.

Example

Gets the UiName of the viewApplet object element and prints the custom message.

//Using Java variable.
String value = functionLib.viewAppletGetUiName("SIS Account List Applet");
System.out.println("viewApplet UiName is "+value);

functionLib.viewAppletIsExist

Detects whether the specified viewApplet object exists or not.

Format

The functionLib.viewAppletIsExist method has the following command format(s):

functionLib.viewAppletIsExist(AppRepName);

Command Parameters

AppRepName

a String specifying the Applet Repository Name of the object.

Throws

Exception

on any error.

Returns

true if the viewApplet exists else return false if the viewApplet does not exist.

Example

Detects whether the viewApplet exists or not and prints a custom message.

//Using Java variable.
boolean value = functionLib.viewAppletIsExist("SIS Account List Applet");
if(value)
{
 System.out.println("viewApplet object exists");
}
else
{
 System.out.println("viewApplet object does not exist");
}

functionLib.viewAppletSelect

Gets the specified attribute (Applet repository name) of the target HTML element defined by the path.

Format

The functionLib.viewAppletSelect method has the following command format(s):

functionLib.viewAppletSelect(AppRepName);

Command Parameters

AppRepName

a String specifying the Applet repository name.

Throws

Exception

on any error.

Example

Selects an Applet. If you want to select List Applet to Form Applet you use this function.

//Using Java variable.
functionLib.viewAppletSelect("SIS Account List Applet");

functionLib.viewCount

Gets the number of view objects present in the current context for Second level view bar.

Format

The functionLib.viewCount method has the following command format(s):

functionLib.viewCount( );

Throws

Exception

on any error.

Returns

an Integer value of the views count.

Example

Gets the number of views present in the current context and prints the custom message.

//Using Java variable.
int count = functionLib.viewCount();
System.out.println("Count is "+count);

ViewGetROProperties

The ViewGetROProperties enum has the following values:

Table 20-17 List of ViewGetROProperties Values

Value Description

ActiveApplet

The ViewGetROProperties ActiveApplet attribute.

AppletCount

The ViewGetROProperties AppletCount attribute.

rn

The ViewGetROProperties rn (Repository Name) attribute.

un

The ViewGetROProperties un (UI Name) attgibute.


functionLib.viewGetROProperty

Gets the specified attribute (PropertyName) of the target HTML element defined by the path.

Format

The functionLib.viewGetROProperty method has the following command format(s):

functionLib.viewGetROProperty(PropertyName);

Command Parameters

PropertyName

a String specifying the property name.

Throws

Exception

on any error.

Returns

the current value of the test object property from the object in the application.

Example

Gets the AppletCount of the View element with the attribute AppletCount and prints the custom message.

//Using Java variable.
String value = functionLib.viewGetROProperty("AppletCount");
System.out.println("Total Applet Count in the view is "+value);

functionLib.viewRepositoryName

Gets the rn attribute of the target HTML element.

Format

The functionLib.viewRepositoryName method has the following command format(s):

functionLib.viewRepositoryName( );

Throws

Exception

on any error.

Returns

a String specifying the rn property of the view object.

Example

Gets the rn attribute and prints the custom message.

//Using Java variable.
String value = functionLib.viewRepositoryName();
System.out.println("Repository Name is "+value);

functionLib.viewUiName

Gets the specified attribute (UI Name) of the target HTML element defined by the path.

Format

The functionLib.viewUiName method has the following command format(s):

functionLib.viewUiName( );

Throws

Exception

on any error.

Returns

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.

Example

Gets the UI Name of the object element and prints the custom message.

//Using Java variable.
String value = functionLib.viewUiName(); 
 System.out.println("ViewUiName is "+value);

functionLib.visibilityFilterActiveItem

Gets the currently active visibility filter item name in the List Applet.

Format

The functionLib.visibilityFilterActiveItem method has the following command format(s):

functionLib.visibilityFilterActiveItem( );

Throws

Exception

on any error.

Returns

a String of the filter item name.

Example

Gets the currently active visibility filter item name.

//Using Java variable.
web.link(18,"//web:a[@rn='Sitemap.Activity List View' " +
 "and @ot='SiebWebSitemapView' or @un='Activity List']")
 .click();
String activeVisibilityFilterName = functionLib.visibilityFilterActiveItem();
System.out.println("Filter Name is "+activeVisibilityFilterName);

functionLib.waitDomToLoad

Waits until the Document Object Model (DOM) of the page gets loaded.

Format

The functionLib.waitDomToLoad method has the following command format(s):

functionLib.waitDomToLoad( );

Throws

Exception

on any error.

Example

Waits until the DOM gets loaded.

functionLib.waitDomToLoad();

functionLib.webListGetItemByIndex

Gets the specified attribute (Item) of the target HTML element defined by the path.

Format

The functionLib.webListGetItemByIndex method has the following command format(s):

functionLib.webListGetItemByIndex(xpath, index);

Command Parameters

xpath

a String specifying the object path.

index

an integer specifying the object location.

Throws

Exception

on any error.

Returns

the item in a web list for the specified Xpath and index.

Example

Gets the Item of the Weblist object element and prints the custom message.

//Using Java variable.
String value = functionLib.webListGetItemByIndex("/web:window[]" +
 "/web:document[]" +
 "/web:form[@name='SWEForm1_0']" +
 "/web:select[(@id='s_1_l_searchField') " +
 "and multiple mod 'False']", 4);
System.out.println("web list item selected is "+value);

functionLib.webListItemCount

Gets the Itemcount attribute of the target HTML element defined by the path.

Format

The functionLib.webListItemCount method has the following command format(s):

functionLib.webListItemCount(xpath);

Command Parameters

xpath

a String specifying the object path.

Throws

Exception

on any error.

Returns

the total number of items for the given Xpath.

Example

Gets the total number of list items for the given Xpath and prints the custom message.

//Using Java variable.
int value = functionLib.webListItemCount("/web:window[]" +
 "/web:document[]" +
 "/web:form[@name='SWEForm1_0']" +
 "/web:select[(@id='s_1_l_searchField') " +
 "and multiple mod 'False']");
System.out.println("Total number of list items is "+value);

functionLib.webListSelectItemByIndex

Selects the specified Item in a web list for the given Xpath and index of the target HTML element.

Format

The functionLib.webListSelectItemByIndex method has the following command format(s):

functionLib.webListSelectItemByIndex(xpath, index);

Command Parameters

xpath

a String specifying the object path.

index

an integer specifying the object location.

Throws

Exception

on any error.

Example

Selects the item in a web list for the given Xpath and index.

//Using Java variable.
functionLib.webListSelectItemByIndex("/web:window[]" +
 "/web:document[]" +
 "/web:form[@name='SWEForm1_0']" +
 "/web:select[(@id='s_1_l_searchField') " +
  "and multiple mod 'False']", 4);

functionLib.webListSelectItemByValue

Selects the item in a web list for the specified Xpath and Value of the target HTML element.

Format

The functionLib.webListSelectItemByValue method has the following command format(s):

functionLib.webListSelectItemByValue(xpath, Name);

Command Parameters

xpath

a String specifying the object path.

Name

a String specifying the object name.

Throws

Exception

on any error.

Example

Selects the item in a web list for the specified Xpath and name.

//Using Java variable.
functionLib.webListSelectItemByValue("/web:window[]" +
 "/web:document[]" +
 "/web:form[@name='SWEForm1_0']" +
 "/web:select[(@id='s_1_l_searchField') " +
  "and multiple mod 'False']", "Name");