Selenium To Avo
The Selenium To Avo feature helps you to migrate existing Selenium automation scripts into Avo Assure Test cases.
Prerequisites
Before you migrate Selenium scripts to Avo Test cases, make sure the following requirements are fulfilled:
Selenium Environment: You must have a configured Selenium development environment (such as Eclipse) to execute the scripts.
Intercept Setup: You must set up the interceptors in your project.
Script Status: Your Selenium automation scripts are up to date.
Error-free Execution: Ensure the Selenium script runs successfully without any errors before using it in Avo Assure.
Avo Assure Access: You must have access to the Avo Assure server.
Supported Languages: Avo Assure currently supports Java and JavaScript. You must have Selenium scripts written in one of these languages.
Migrating Selenium Scripts
To migrate your scripts, you must first set up the interceptor in your project, generate the scenario file, and then import it into Avo Assure.
The interceptor allows you to execute code before and after your automation logic without modifying the core functionality of the scripts.
Note:
During migration, Avo Assure considers only Selenium actions performed on the browser.
Avo Assure maps Selenium test data automatically. You should review the migrated data to ensure it is correct.
During migration, Avo Assure normalizes all Selenium select actions. The following actions are migrated as selectByValue in Avo Assure:
selectByValue
selectByIndex
selectByVisibleText
Downloading and Configuring Intercept
To download and configure the Selenium scripts to Avo Assure, perform the following actions:
On the Home page, go to Utilities and select the Migrate To Avo tab.
On the Selenium To Avo page, select the programming language used in your Selenium project (such as, Java or JavaScript) to apply the appropriate migration logic.
Select Download to save the intercept package file (java-intercept.zip) to your local machine.
Extract the downloaded java-intercept.zip file.
Copy the extracted intercept folder and place it in the required location within your Selenium project directory. For Example, <Path to your Selenium project>/src/main/java.
Configure the Intercept: Configuring the Intercept allows Avo Assure to capture Selenium browser actions and data parameterization during execution, ensuring accurate migration. To configure the intercept, perform the following actions:
Note: This configuration is a one-time setup.
Enabling WebDriver Interception
In BrowserFactory.java file, add the import statement and update the browser initialization line as shown in the following example:
import intercept.InterceptWebDriver;
Before:
tldriver.set(new ChromeDriver(options));
After:
tldriver.set(new InterceptWebDriver(newChromeDriver(options)));
How it works?
Replacing tldriver.set(new ChromeDriver(options)); with tldriver.set(new InterceptWebDriver(new ChromeDriver(options))); allows the automation framework to monitor and intercept browser actions during test execution.
Updating testRunner Configuration
On the Editor, open testRunner.java.
Add "intercept" to the glue parameter.
Update the glue variable as shown below:
glue = { "steps", "intercept" }
How it works?
Adding "intercept" to the glue parameter in testRunner.java file instructs the framework where to look for step definitions related to WebDriver interception.
By updating glue = { "steps", "intercept" }, the framework can correctly link your test steps with the interception logic, ensuring smooth execution of tests with the new WebDriver setup.
Enabling Data Parameterization
Add the following code snippet to the setTestData function in your common Excel data reader file (such as CommonStepsForTestDataReader.java):
import intercept.AvoHooks;
AvoHooks.setExcelData(tableValue);
How it works?
tableValue is the variable that stores the test data from your Excel sheet. It can have multiple rows and columns, depending on your test.
AvoHooks.setExcelData(tableValue) lets the automation framework use this data during the test, so your tests can run with different inputs automaticall

Generating and Uploading Scenarios
To generate and upload Selenium scripts to Avo Assure, perform the following actions:
Execute your Selenium automation suite.
Result: The execution generates a scenarios_batch.zip file in your project’s output folder.
Note: The scenarios_batch.zip file is generated at the following location: <Path to your Selenium project>/src/main/java/intercept/output.
Go to the Selenium To Avo page in Avo Assure.
In the Select Project dropdown, select the Avo Assure project where you want to import the test cases.
Upload the scenarios_batch.zip file generated in step 1.
After uploading the file, select Start Migration button. The Migration Status dialog opens.

On the Migration Status dialog, it displays the following details:
Element Repository Folder and Testcase Folder name.
Testcase Name and migration Status.
The system provides a downloadable Excel file that contains data parameterization details. Use this Excel file as a reference to review and correct the migrated test cases in Avo Assure, if required. The Excel file includes the following information:
Testcase name.
Test Step Group name.
Step details, including whether data parameterization is present.
7. Select Ok to close the Migration Status dialog.

Note: After the migration is complete, verify the following:
Review the migrated test cases for accuracy.
Verify that test data is mapped correctly.
Manually validate business-critical test scenarios.
Data is parameterized only when you enable Data Parameterization. Otherwise, Avo Assure uses hardcoded values.
Last updated