Document toolboxDocument toolbox

Recommendations and Rules for Custom Actions


In order to create the custom actions for Selenium Webdriver, you need to create the action in Java and then map this action into Qualitia Automation Studio. You can use any IDE tool like Eclipse.

The following are some rules that should be considered when creating custom actions:

  • The parameter data types supported by Qualitia are String and Array. If an array parameter is used in Qualitia for the custom action, then custom action parameter should be of the type Object in Custom Action function. The parameter can then be type-casted into the data type which is required in the action.
    For example, the object parameter can be type-casted into the array list.
  • You must specify the return values for every method in a custom action. The return values are pre-defined to denote the execution statuses as shown in the following:
    • 0 denotes the method has passed.
    • 1 denotes the method has failed.
    • 2 denotes the method has defects.
  • Based on the standard Java coding rules, actions should not be created in the default package. For better maintenance, it is recommended to use user-defined packages for development.
  • It is recommended to put a prefix when defining a name for new custom actions for easy identification.
  • No two custom actions can have the same function name in the same class. Function overloading is not allowed. Duplicate function names in different classes are allowed (not recommended). 
  • Once the action is mapped into Qualitia and used in a test case, do not change the existing signature or other details of the actions or the classes created. The functionality of the action can be modified. Do not delete the custom actions or custom classes that are used in test cases.
  • If the custom action belongs to any object type (such as WebEdit, WebElement, and so forth), ensure you add the objectInfo data type parameter while developing the code of an action.
  • While mapping actions into Automation Studio, it is important to map the action using <package.class> hierarchy. 
  • Objects should be added under appropriate Qualitia classes while mapping custom actions into Qualitia Automation Studio.

     View Image