Oracle Forms API Details
Common input parameters:
For static control IDs:
searchPath: you can get the serachPath of any component by using SearchPath API startScraping (). This has to passed in eachAPI call to be performed on the same component for which you have taken the search path.
For Dynamic control IDs:
windowName, componentID: window name is the name of oracle from window. E.g. oracle.ewt.swing.JBuffredFrame. Component ID is the unique id for a given control. You can get these parameters by calling oracle API startScrapingOForms().
Below is the list of APIs for Oracle Forms.
SetOText
publicbool SetOText(String searchPath, String text)
This API is used to set Text for components which supports setting text to LWTEXTFIELD, LWTEXTCOMPONENT ,LWTEXTAREA, VTEXTAREA, VTEXTFIELD etc. It takes search path of component and text as input parameters and set the text to corresponding component.
OClick
public void OClick(String searchPath)
This API takes the searchPath of the component and perform click on the given component.
OMenuclick
publicvoid OMenuclick(String searchPath, String mainMenu, String subMenu)
This API allows user to select a menu item from the menu bar. This API takes search path, Main Menu, sub menu as input parameters. Search path should be of LWMenuBar component or exact LWMenu Component. E.g.) If you are clicking “FileàOpen…” then pass Main menu as “File” and submenu as “Open…”. If you want to click on “FileàPropertiesàDisplay…” then pass Main menu as “File” and submenu as “Properties/Display…”. Note that submenu has to be separated by “/” if submenu itself has another submenu.
NOTE: |
Option for passing either LWMenu or LWMenuBar is given for users’ convenience. Other parameters are kept same. |
GetOText
publicString GetOText(String searchPath)
This API is same as setText but does reverse process. It gets the value from component given. It takes search path of component as parameter and returns the text.
GetOLabel
publicString GetOLabel(String searchPath)
This API is used to get Text from a component. It is same as getText but some component supports getLabel instead of getText so this API can be used to get the text from controls.
OSelectTab
publicbool OSelectTab(String searchPath, String tabName)
This API allows to select a tab in tab bar given tab name. This API takes tabbed pane search path and tab name as input parameters.
GetSelectedTabText
publicString GetSelectedTabText(String searchPath)
This API returns the selected tab name. This API takes tab bar pane search path as input parameter.
OSelectDSItemByIndex
public bool OSelectDSItemByIndex(String searchPath, int dsIndex)
This API is used to select the data source item given the index. This API takes search path and item index as input parameters.
OSelectDSItemByValue
public bool OSelectDSItemByValue(String searchPath, String dsName)
This API is used to select the data source item given name of item. This API takes search path and item name as input parameters.
GetOCheckBoxStatus
publicbool GetOCheckBoxStatus(String searchPath)
This API allows user to get the status of the check box (selected/not selected-true/false) given searchPath of the check box.
GetOCheckBoxText
public StringGetOCheckBoxText(String searchPath)
This API allows user to get the text of the check box given search path of the check box.
SelectOValue
public voidSelectOValue(String searchPath, String value)
This API allows user to select value in a choice box using value. It takes tree search path and value as input parameters.
SelectOValueAt
publicvoid SelectOValueAt(String searchPath, int index)
This API allows user to select value in a choice box using index. It takes tree search path and index as input parameters.
GridRowDoubleClick
publicvoid GridRowDoubleClick(String searchPath, int row, int col)
This API is used to perform double click on grid row. It first selects particular row given by row No. and col No. and then double clicks on it.
GetOnScreenColumnCount
publicInt32 GetOnScreenColumnCount(String searchPath)
This API returns the visible column count on screen in a grid. It Takes search path of the grid as input parameter.
GetOnScreenRowCount
publicInt32 GetOnScreenRowCount(String searchPath)
This API returns the visible row count on screen in a grid. It Takes search path of the grid as input parameter.
SelectGridRow
publicvoid SelectGridRow(String searchPath, int rowNo)
This API is used to select particular row in ACCESSIBLE Table Grid given by the row no. It takes search path of grid and row number as input parameters.
GridRowRobotEnter
publicvoid GridRowRobotEnter()
This API is used to send keyboard ENTER event on selected row in grid using Robot class. This method can be used to perform enter event selected row in a grid provided the window should be in focus, it can be done by first calling requestFocus API to get the window in focus and calling this method.
SetOKeyEventText
publicBoolean SetOKeyEventText(String searchPath, String text)
This API is used to set text using key events as if user entering the values using keyboard. We require this API when in some cases the text set by setText method is not recognized by the application. This API takes following parameters-
searchPath- Control id of text box
text-text to be set
GetCellData
public StringGetCellData(String searchPath, int rowNo, int colNo)
This API is used to get the data from a cell in a List. This API takes following parameters-
searchPath- Control id of text box
rowNo- row index of cell
colNo- column index of cell
GetHeaderData
public String GetHeaderData(String searchPath, int colNo)
This API is used to get the data of the header in a List. This API takes following parameters-
searchPath- Control id of text box
colNo- column index of cell
GetColumnCount
public Int32 GetColumnCount(String searchPath)
This API is used to get the column count in a List. This API takes following parameters-
searchPath- Control id of list
GetRowCount
public Int32 GetRowCount(String searchPath)
This API is used to get the row count in a List. This API takes following parameters-
searchPath- Control id of list
SelectListViewItemByIndex
public void SelectListViewItemByIndex(String searchPath, int index)
This API is used to select a particular row in a List. This API takes following parameters-
searchPath- Control id of list
index- index of the row to be selected
GetOComponentBackgroundColor
public string GetOComponentBackgroundColor (String searchPath)
This API is used to get background color of a field. This API takes following parameters-
searchPath- Control id of component
GetOComponentForegroundColor
public string GetOComponentForegroundColor (String searchPath)
This API is used to get foreground color of a field. This API takes following parameters-
searchPath- Control id of component
ODoubleClick
public void ODoubleClick (String searchPath)
This API is used to perform double click on passed component. This API takes following parameters-
searchPath- Control id of component
StartScrapingOForms
public String StartScrapingOForms()
This API is used to get the window name of oracle form container and the component ID for a particular component. These two parameters will be used as input parameter for each API call.
SetTextDynamic
public bool SetTextDynamic(String windowName, String componentID, String str)
This API is used to set Text for components which supports setting text to LWTEXTFIELD, LWTEXTCOMPONENT, LWTEXTAREA, VTEXTAREA ,VTEXTFIELD etc. It takes oracle form window name and component id of component (should get it first by calling StartScrapingOForms API) and text as input parameters and set the text to corresponding component.
ClickDynamic
public void ClickDynamic(String windowName, String componentID)
This API takes oracle form window name and component id of component (should get it first by calling StartScrapingOForms API) and perform click on the given component.
MenuclickDynamic
public void MenuClickDynamic(String windowName, String componentID, String mainMenu, String subMenu)
This API allows user to select a menu item from the menu bar. This API takes oracle form window name and component id of component (should get it first by calling StartScrapingOForms API), Main Menu, sub menu as input parameters. Search path should be of LWMenuBar component or exact LWMenu Component. E.g.) If you are clicking “FileàOpen…” then pass Main menu as “File” and submenu as “Open…”. If you want to click on “FileàPropertiesàDisplay…” then pass Main menu as “File” and submenu as “Properties/Display…”. Note that submenu has to be separated by “/” if submenu itself has another submenu.
NOTE: |
Option for passing either LWMenu or LWMenuBar is given for users’ convenience. Other parameters are kept same. |
ClickRadioMenuItemDynamic
public void ClickRadioMenuItemDynamic(String windowName, String mainMenu, String radioComp1, String radioComp2, String radioButtonLabel)
This API is used to click on RadioButtonMenuItem in Menu Bar. It takes oracle form window name, main menu name (in which radio button needs to be clicked), component ID of first radio button, component Id of second radio button and radio button label (without the number).
GetTextDynamic
public String GetTextDynamic(String windowName, String componentID)
This API is same as setText but does reverse process. It gets the value from component given. It takes oracle form window name and component id of component (should get it first by calling StartScrapingOForms API) as parameter and returns the text.
GetTitleDynamic
public String GetTitleDynamic(String windowName, String componentID)
This API gets the title name for the given ExtendeFrame. It takes oracle form window name and component id of component (should get it first by calling StartScrapingOForms API) as parameter and returns the text.
GetLabelDynamic
public String GetLabelDynamic(String windowName, String componentID)
This API is used to get Text from a component. It is same as getText but some component supports getLabel instead of getText so this API can be used to get the text from controls.
SelectTabDynamic
public bool SelectTabDynamic(String windowName, String componentID, String tabName)
This API allows to select a tab in tab bar given tab name. This API takes oracle form window name and tabbed pane component id of component (should get it first by calling StartScrapingOForms API) and tab name as input parameters.
GetSelectedTabTextDynamic
public String GetSelectedTabTextDynamic(String windowName, String componentID)
This API returns the selected tab name. This API takes oracle form window name and component id of tab bar as input parameter.
GetCheckBoxStatusDynamic
public bool GetCheckBoxStatusDynamic(String windowName, String componentID)
This API allows user to get the status of the check box (selected/not selected-true/false) given oracle form window name and component id of component (should get it first by calling StartScrapingOForms API) of the check box.
GetCheckBoxTextDynamic
public String GetCheckBoxTextDynamic(String windowName, String componentID)
This API allows user to get the text of the check box given oracle form window name and component id of component (should get it first by calling StartScrapingOForms API) of the check box.
SelectChoiceBoxValueDynamic
public void SelectChoiceBoxValueDynamic(String windowName, String componentID, String value)
This API allows user to select value in a choice box using value. It takes oracle form window name and component id of component (should get it first by calling StartScrapingOForms API) and value as input parameters.
SelectChoiceBoxValueAtDynamic
public void SelectChoiceBoxValueAtDynamic(String windowName, String componentID, int index)
This API allows user to select value in a choice box using index. It takes oracle form window name and component id of component (should get it first by calling StartScrapingOForms API) and index as input parameters.
GridRowDoubleClickDynamic
public void GridRowDoubleClickDynamic(String windowName, String componentID, int row, int col)
This API is used to perform double click on grid row. It first selects particular row given by row No. and col No. and then double clicks on it.
GetOnScreenColumnCountDynamic
public Int32 GetOnScreenColumnCountDynamic(String windowName, String componentID)
This API returns the visible column count on screen in a grid. It takes oracle form window name and component id of grid (should get it first by calling StartScrapingOForms API) as input parameter.
GetOnScreenRowCountDynamic
public Int32 GetOnScreenRowCountDynamic(String windowName, String componentID)
This API returns the visible row count on screen in a grid. It Takes oracle form window name and component id of grid (should get it first by calling StartScrapingOForms API) as input parameter.
SelectRowDynamic
public void SelectRowDynamic(String windowName, String componentID, int rowNo)
This API is used to select particular row in ACCESSIBLE Table Grid given by the row no. It takes oracle form window name and component id of grid (should get it first by calling StartScrapingOForms API) and row number as input parameters.
GetCellDataDynamic
public String GetCellDataDynamic(String windowName, String componentID, int rowNo, int colNo)
This API is used to get the data from a cell in a List. It takes oracle form window name and component id of component (should get it first by calling StartScrapingOForms API), rowNo- row index of cell and colNo- column index of cell as input parameters.
GetHeaderDataDynamic
public String GetHeaderDataDynamic(String windowName, String componentID, int colNo)
This API is used to get the data of the header in a List. It takes oracle form window name and component id of component (should get it first by calling StartScrapingOForms API) and colNo- column index of cell as input parameters.
GetColumnCountDynamic
public Int32 GetColumnCountDynamic(String windowName, String componentID)
This API is used to get the column count in a List. It takes oracle form window name and component id of component (should get it first by calling StartScrapingOForms API) as input parameters.
GetRowCountDynamic
public Int32 GetRowCountDynamic(String windowName, String componentID)
This API is used to get the row count in a List. It takes oracle form window name and component id of component (should get it first by calling StartScrapingOForms API) as input parameters.
SelectListViewItemByIndexDynamic
public void SelectListViewItemByIndexDynamic(String windowName, String componentID, int index)
This API is used to select a particular row in a List. It takes oracle form window name and component id of component (should get it first by calling StartScrapingOForms API) and index- index of the row to be selected as input parameters.
IsOExists
public Boolean IsOExists(String windowName, String componentID)
This API is used to check if particular component exists at given time. This API takes oracle form window name and component id of component (should get it first by calling StartScrapingOForms API) as input parameter and returns true if the component exists with given path and returns false if component does not exist.\
IsOEnabled
public Boolean IsOEnabled(String windowName, String componentID)
This API returns true if the component exists at given location and is enabled. Return false if component is not enabled. E.g.) Disabled button. If component not exists with given oracle form window name and component id of component (should get it first by calling StartScrapingOForms API) then it will throw exception.
IsOVisible
public Boolean IsOVisible(String windowName, String componentID)
This API returns true if the component exists at given location and is visible. Return false if component is not visible. E.g.) Hidden button. If component not exists with given oracle form window name and component id of component (should get it first by calling StartScrapingOForms API) then it will throw exception.
IsOFocused
public Boolean IsOFocused(String windowName, String componentID)
This API returns true if the component exists at given location and is focused. Return false if component is not in focus. If component not exists with given oracle form window name and component id of component (should get it first by calling StartScrapingOForms API) then it will throw exception.
RequestOFocus
public void RequestOFocus(String windowName, String componentID)
This API takes oracle form window name and component id of component (should get it first by calling StartScrapingOForms API) as input parameters. It will request for focus for given component. This API returns void. Behavior of request focus will be application dependent and can get focus if application supports so.
GetComponentBackgroundColorDynamic
public string GetComponentBackgroundColorDynamic ((String windowName, String componentID)
This API takes oracle form window name and component id of component as input parameters. This method returns background color of component in RGB format.
GetComponentForegroundColorDynamic
public string GetComponentForegroundColorDynamic ((String windowName, String componentID)
This API takes oracle form window name and component id of component as input parameters. This method returns foreground color of component in RGB format.
DoubleClickDynamic
public void DoubleClickDynamic (String windowName, String componentID)
This API takes oracle form window name and component id of component (should get it first by calling StartScrapingOForms API) as input parameters. It double clicks on component passed.