AutoFindObjectAction
The AutoFindObjectAction action searches for the specified business object and saves it for other actions to use.
<testcase>
element by using the <action>
element. Set the value for the
name
attribute of the <action>
element to identify the name and
package of the action.
<testcase>
<action name="cmc/automation/AutoFindObjectAction">
...
</action>
</testcase>
Parameters
This action accepts the following parameters:- searchType
- Required: The search type that is used to locate the search definition that is used to run the search.
- searchText
- Optional: The search text that is used to search for the business object.
- searchKey
- Optional: The name of a value set by the AutoSetValueAction action that is used as the search text.
- searchOption.option
- Optional: The search option value that is passed to the search service, where
option is the name of the search option. For example, the
searchOption.catalogId
parameter sets the catalog ID search option. You can specify multiple search options with different names. - searchOptionKey.option
- Optional: The name of a value set by the AutoSetValueAction action that is used as a search option, where option is the name of the search option.
- objectKey
- Optional: The name that is used to keep a reference to the business object so it can be used by other actions.
Example
The following code snippets show examples of these parameters when used in the AutoFindObjectAction action:- Example 1
-
<!-- Find web activity --> <action name="cmc/automation/AutoFindObjectAction"> <param name="searchType" value="FindActivities"/> <param name="searchKey" value="test_webactivity_name"/> <param name="objectKey" value="webactivity"/> </action>
- Example
2
<!-- Verify Sales Catalog Group TopSalesCategory11 --> <action name="cmc/automation/AutoFindObjectAction"> <param name="searchType" value="FindSalesCategories"/> <param name="searchKey" value="TopSalesCategory11_searchKey"/> <param name="objectKey" value="TopSalesCategory11"/> <param name="searchOptionKey.catalogSelectionCatalogGroup" value="SalesCatalog1_CatalogId"/> <param name="searchOptionKey.catalogSelectionCatalogGroupStoreId" value="SalesCatalog1_CatalogStoreId"/> <param name="searchOptionKey.catalogSelectionCatalogGroupIdentifier" value="SalesCatalog1_searchKey"/> </action>