Code Editor
Last updated
Last updated
SimplifyQA's Code Editor feature allows users to write custom methods tailored to their application's unique behaviors. Whether you need to handle complex UI logic or external data processing, the Code Editor lets you extend test automation with Java-based scripting, AI assistance, and seamless integration with your test cases.
Before using the Code Editor, make sure:
GIT BASH is installed if you are using Windows OS.
SimplifyQA Agent is successfully installed and running.
is installed.
.
Go to your User Profile
Click Settings and navigate to the Downloads section
Go to the Code Editor tab and click Download Installer. Choose the OS from the dropdown for either windows, MAC or Linux.
Install it for user level access.
Ensure installation is done in the default or pre-defined path.
Additional Tips
User should go with Project-Level Configuration when custom methods are specific to a single project or team. This limits access and customisation to that project only, maintaining isolation and control.
Whereas, Customer-Level Configuration is useful when common logic or reusable custom methods are shared across multiple projects within the same customer account. This ensures standardisation and efficient code reuse, especially for larger teams or organisations managing multiple test projects.
Switch back to user mode.
Under Test Management, click Code Editor from the left panel.
Based on your configuration, you'll either see a project-specific folder or a customer-level folder.
Navigate to: src > main > SampleClass
to view sample custom methods.
Write your custom methods in CustomMethods.java file or create your own java file and start writing the code in the format given below,
Below is the explanation of the above code:
uniqueId: A unique identifier for the action to avoid conflicts during syncing.
groupName: The category under which the custom action will appear in test cases in SimplifyQA.
@ObjectTemplate: Defines the platform type and description for the custom action.
customAddition(int... ints): A method that adds multiple integer values provided at runtime.
driver: The main test driver object that enables method execution across platforms.
getGenericMethods(): Accesses SimplifyQA’s generic utility methods. Selecting getGenericMethods
will display all actions in the 'Generic' object template. You can extend these actions to create your custom method.
additionOfValues(ints): A method that adds the provided integer values.
log.info("addition of values performed"): Logs a message indicating successful addition execution. Users can access execution logs directly from their agent folder.
Navigate to: SimplifyQA > dist > [Project ID] > agent > logs
return true: Indicates successful completion of the custom method.
Save the file and run the command:
When prompted with: "PLEASE SELECT: DO YOU WANT TO USE LOCAL JAR PRESENT IN TARGET FOLDER FOR EXECUTION? ENTER Y (for yes) OR N (for no):"
➤ Enter Y if you want to use your updated local JAR file for execution. This will save your changes and generate a new local JAR. ➤ Enter N if you prefer to use the existing cloud JAR. The tool will then download the current version from the cloud for execution.
Additional Note: Driver & Object Injection Annotations The SimplifyQA Code Editor also supports additional annotations to streamline development:
@AutoInjectWebDriver
or @AutoInjectAndroidDriver
or any technology stack— Automatically injects the appropriate driver (mentioned Tech stack ike web or android or iOS) into your custom method.
@AutoInjectCurrentObject
— Injects the current object repository reference into your method for easier interaction with UI elements.
Navigate to the agent folder path: workspaces > [project_number] > project > target
The newly created [Project_Name]-version-jar-with-dependencies.jar
file with your custom methods will be here
To use the Code Editor in SimplifyQA, it must be configured from the - either at the Project Level or the Customer Level. This setup defines where and how the Code Editor is accessible based on user roles and project requirements.
@SyncAction: Annotation to define a reusable custom action that can be synced into SimplifyQA. Refer to to learn more about sync annotation.