Documentation - aqua cloud
🇬🇧 English
🇬🇧 English
  • 💻Web client
    • Getting started
    • General
      • Home page
      • App language
      • User account
      • Change password
      • Shortcuts & Accessibility
    • How to Contact Our Support
  • 👩‍🔧Administration
  • User administration
    • Adding and editing user profile
    • Roles and permissions
    • Assign, unassign or change licenses
      • Comparison of Licenses
    • Assign/unassign projects and roles
    • Licenses statistics
    • Statistics
  • Project configuration
    • [NEW] Project template configuration (fields)
      • Shared value sets
    • [OLD] Project template configuration (fields)
      • Shared value sets
      • Creating field groups
    • Field rules
    • [NEW] Workflow configuration
      • Global rules
      • Status and transitions
    • [OLD] Workflow configuration
    • Additional project settings
    • Project integrations
    • System log
    • Email notifications
      • Project default notifications
      • My notifications
      • Configuration of the project notification templates
      • Troubleshooting
  • Projects and folders
    • Project wizard
    • Projects
      • Export project
      • Import project
        • Migration from Testrail
      • Archive project
    • Folders
      • Export project folder
      • Import project folder
  • 🧩Modules
  • Navigation page
    • Project tree
    • Items grid
    • Filtering and grouping
    • Views
    • Search
    • Preview item details
  • Items
    • Requirements management
      • Requirements
      • Subrequirements
      • Requirements coverage
    • Test cases management
      • Test cases
      • Nested test cases (shared test cases/steps)
      • Manual testing
      • Test data or Variables manager
      • Test environment tracking with labels (tags)
      • Test execution results
      • Test automation
      • Capture: Test recorder/bug reporter
      • Test it: easy way to start run
      • Quick run: test execution of multiple test cases at once
    • Test scenarios management
      • Test scenarios
      • Adding test cases to a test scenario
      • Executing test scenarios
    • Defects management
      • Defects
      • Creating a defect from a test execution
      • Review found or linked defects to the test execution
      • Creating a defect with Capture
    • General item capabilities
      • Creating and Editing Items
      • Copy item to a target project or duplicate within a project
      • Taking over field values between items
      • Item template (defaults)
      • Dependencies
      • Add links to a description
      • Take screenshots
      • Watch item and notify other users
      • Attachments (files)
      • History of changes
      • Discussions (comments)
      • Print item data
  • Reporting
    • Creating a new report template
    • Basic report elements
    • Element tree structure
    • Element properties
    • Diagrams
    • Pivot table
    • 'Sum' function
    • Creating custom report script
    • Parametrization of reports
    • Exclude empty items from a report
    • Adding table of contents to a report
    • How to filter executions based on custom added fields?
  • Dashboards
    • Creating a dashbord
    • Publishing the dashboard
    • Creating a chart
    • KPI alerts
    • Drilldown to details from a chart
    • Burndown chart template
  • Agile
    • Backlog
    • Sprint board
    • Preview
  • 🖥️Desktop client
    • Getting started
      • Important notice: Deprecation of the desktop client in June 2025 [updated]
      • FAQ: Transitioning from the desktop client to the web Client
      • Desktop installation
      • Home screen configuration
      • Views
      • Grid
    • Agile board
      • Burn Down Chart
    • Dashboard
    • User Administration
      • Adding and managing users
      • Roles and permissions
      • Assigning licenses projects and roles
      • Statistics
    • Project configuration
      • Configuration of Fields and Workflows
      • Email Notification
      • Change company logo in printout
      • Import Project Configuration
    • Import / Export Wizard
    • Project Planner
      • Creating and editing a new project plan
      • Adding and syncing items to project plan
      • Resource planning
      • Gates and Stages
    • Requirements Management
      • Dependency
      • Subrequirements
      • Mind map
      • Comments
      • Documents
    • Test Management
      • Step Designer
      • Test Execution
        • Autosave of a test execution
      • Variable Manager
      • Nested Testcases
      • Disable manual test execution time
    • Test Scenarios
      • Test Scenarios
      • Scheduled Executions of Test Scenarios
      • Run Dependency
    • Defect Management
    • Reporting
      • Creating a Report
      • Creating a new report template
      • The Report Wizard
      • Basic Report Elements
      • Element tree structure
      • Element Properties
      • Diagrams
      • Pivot Table
      • Sum Function
      • Script Development
      • Parametrization
      • Performance Improvements for Report Creation
      • Remove empty elements
      • Table of Contents
      • Invalid References
    • Agile Board
      • Configuring the Agile Component
      • Planning board
      • Scrum board
      • Burn Down Chart
    • Versioning
  • 💿Installation for on premise
    • System Requirements
      • Server
      • Desktop Client
      • Web Client
      • Agents
    • Server Installation
    • Server parameters
    • Web Client Installation
    • Getting Agents
    • Connection to MSSQL Database
    • Connection to Oracle Database 12.2c
    • Licenses
    • Monitoring
    • SSL-Configuration
    • Content Security Policy (CSP) Settings
  • 🪄AI Copilot
    • Transform your testing and project management with aqua's AI Copilot
    • Enable and manage AI Copilot options
    • Create documents with ease with AI Copilot
    • AI Copilot: generate a comprehensive description for the test cases in just one click
    • AI Copilot - create test cases out of requirements or based on context in seconds
      • Create test cases from the navigation page
      • Create test cases from a requirement
      • Create a test case from a test case page
    • Generate test data with AI Copilot
    • Generate test case based on a file
    • Generate test cases in BDD format
    • Generate test cases with AI Copilot using test design techniques
    • Create user stories, BDDs, or PRDs based on a file
    • Create multiple user stories or BDDs with AI Copilot
    • Split or convert requirements
    • AI Copilot chat
  • 🔗Integrations
    • Jira sync: synchronize items between aqua and Jira projects
      • Before you begin: key steps for synchronization
      • Sync configurator set up
        • Sync Configurator options
      • Log in to the Sync Configurator
      • Sync of the projects between aqua and Jira
      • Fields mapping
        • Supported default Jira fields
        • General aqua and Jira fields compatibility
        • Special compatibility for aqua and Jira fields
      • Additional settings
        • Allow mapping of only selected values and ignore other field values for the sync
        • Automatic creation and mapping of field values
      • Troubleshooting
      • Synchronisaton of subtasks with aqua
      • Formatting support
    • Azure Devops sync
    • Jira link: create and/or link Jira issues to aqua tickets
    • aqua4Jira plugin: Cover Jira issue with aqua test cases
      • Installation of the plugin
        • aqua4Jira Plugin - Now Compatible with Jira Data Center!
      • Configuration in Jira
      • Configuration in aqua
    • Automatic display of test cases or test scenarios in Jira tickets
    • Confluence integration
    • Capture: record tests or create comprehensive bug reports
    • Testlink: importer tool for migrating test cases to aqua
    • SSO
      • LDAP
      • SAML Configuration
        • Installation
        • Sample
  • 🌀Automation
    • Desktop Client
      • Creating an Automation Agent
      • Configure Automation
      • Ranorex
      • UFT
      • JMeter
      • SoapUI
      • Database
      • UnixShell
      • PowerShell
      • Automation Library
    • Web Client
      • Automation Agent
        • Creation & Configuration
        • Agent pools
        • Running task
      • Powershell
      • Unix Shell
      • Jenkins integration
      • Selenium
    • REST API
    • Automation: CI/CD tools and aqua REST API
      • Gitlab CI/CD: JAVA/Playwright
      • Gitlab CI/CD: TypeScript/Cypress
      • Gitlab CI/CD: TypeScript/Playwright
      • Gitlab CI/CD: TypeScript/Cypress/Cucumber
  • 🚀Product updates for on premise customers
    • Product updates
      • 25.52.0 - On Premise
      • 25.47.0 - On Premise
      • 25.36.0 - On Premise
      • 25.31.0 - On Premise
      • 25.18.0 - On premise
      • 25.10.0 - On Premise
      • 24.135.0 - On Premise
      • 24.130.0 - On Premise
      • 24.126.0 - On Premise
      • 24.108.0 - On Premise
      • 24.101.0 - On Premise
      • 24.93.0 - On Premise
      • 24.83.0 - On Premise
      • 24.71.0 - On Premise
      • 24.53.0 - On Premise
      • 24.8.0 - On Premise
      • 23.140 - On Premise
      • 23.126.0 - On Premise
      • 23.102.0 - On Premise
      • 23.70.0 - On Premise
      • 23.22.0 - On Premise
      • 22.132.0 - On Premise
      • 22.123.0 - On Premise
    • Release Notes
      • 25.52.0 - On premise
      • 25.47.0 - On Premise
      • 25.36.0 - On Premise
      • 25.31.0 and 25.33.0 - On Premise
      • 25.26.0 - On Premise
      • 25.18.0 - On Premise
      • 25.10.0 - On Premise
      • 24.135.0 - On Premise
      • 24.130.0 - On Premise
      • 24.126.0 - On Premise
      • 24.114.0 - On Premise
      • 24.108.0 - On Premise
      • 24.101.0 - On Premise
      • 24.93.0 - On Premise
      • 24.83.0 - On Premise
      • 24.71.0 - On Premise
      • 24.53.0 - On Premise
      • 24.8.0 - On Premise
      • 23.140.0 - On Premise
      • 23.126.0 - On Premise
      • 23.102.0 - On Premise
      • 23.70.0 - On Premise
      • 23.22.0 - On Premise
      • 22.132.0 - On Premise
      • 22.123.0 - On Premise
  • 🚀Product updates for public and private clouds customers
    • Product updates
      • 25.52.0 - public and private cloud
      • 25.47.0 - public and private cloud
      • 25.36.0 - public and private cloud
      • 25.33.0 - public and private cloud
      • 25.18.0 - public and private cloud
      • 25.10.0 - public and private cloud
      • 24.135 - public and private clouds
      • 24.130 - public and private clouds
      • 24.126.0 - public and private clouds
      • 24.108.0 - public and private clouds
      • 24.101.0 - public and private clouds
      • 24.93.0 - public and private clouds
      • 24.88.0 - public and private clouds
      • 24.83.0 - public and private clouds
      • 24.71.0 - public and private clouds
      • 24.63.0 - public and private clouds
      • 24.50.0 - public and private clouds
      • 24.33.0 - public and private clouds
      • 24.8.0 - public and private clouds
      • 23.140 - public and private clouds
      • 23.126.0 - public and private clouds
      • 23.107.0 - public and private clouds
      • 23.92.0 - public and private clouds
      • 23.70.0 - public and private clouds
      • 23.46.0 - public and private clouds 1/3
      • 23.46.0 - public and private clouds 2/3
      • 23.46.0 - public and private clouds 3/3
      • 23.22.0 - public and private clouds
      • 22.132.0 - public and private clouds
    • Release notes
      • 25.52.0 - public and private cloud
      • 25.47.0 - public and private cloud
      • 25.36.0 - public and private cloud
      • 25.33.0 - public and private cloud
      • 25.31.0 - public and private cloud
      • 25.24.0 - public and private cloud
      • 25.18.0 - public and private cloud
      • 25.10.0 - public and private cloud
      • 24.135.0 - public and private clouds
      • 24.130 - public and private clouds
      • 24.126.0 - public and private clouds
      • 24.114.0 - public and private clouds
      • 24.108.0 - public and private clouds
      • 24.101.0 - public and private clouds
      • 24.93.0 - public and private clouds
      • 24.88.0 - public and private clouds
      • 24.83.0 - public and private clouds
      • 24.71.0 - public and private clouds
      • 24.63.0 - public and private clouds
      • 24.50.0 - public and private clouds
      • 24.33.0 - public and private clouds
      • 24.8.0 - public and private clouds
      • 23.140.0 - public and private clouds
      • 23.126.0 - public and private clouds
      • 23.107.0 - public and private clouds
      • 23.92.0 - public and private clouds
      • 23.70.0 - public and private clouds
      • 23.46.0 - public and private clouds
      • 23.22.0 - public and private clouds
      • 22.132.0 - public and private clouds
      • 22.123.0 - public and private clouds
    • 📢AQUA NEWS
      • Upcoming new storage options for On-premise deployments
      • 🔒 Rate Limits for Public Cloud Users
      • Preview of aqua's public API
      • aqua is now ISO 27001 certified and DORA Compliant
      • Upcoming changes to aqua API
      • AI Copilot launching for All public clouds users on January 27th!
  • 📹Capture
    • What is Capture?
    • Chrome extension installation
    • Capturing in Incognito mode
    • Using Capture with Edge
    • Capturing with video
      • Option to enable mic when capturing a screen and adding voice notes
      • Option to pause/resume while capturing the video
        • Masking sensitive information while capturing
    • Capturing with screenshot
    • Running a test execution
    • Last minute session replay
    • Masked inputs while creating captures
Powered by GitBook
On this page
  • Prerequisites
  • Steps to Set Up and Execute Tests
  • 1. Setting Up the Environment
  • 2. Configuring aqua
  • 3. Setting Up Test Data
  • 4. Executing the Test

Was this helpful?

  1. Automation
  2. Web Client

Selenium

PreviousJenkins integrationNextREST API

Last updated 2 months ago

Was this helpful?

Setting Up Selenium with aqua for Automated Testing

This guide will help you set up Selenium with aqua to run automated tests in your development environment or BrowserStack. Follow the steps carefully to ensure all components are correctly configured.

Prerequisites

Ensure you have the following ready before starting the setup:

  • A running aqua PowerShell agent:

  • Java JDK installed on the server where the agent is running

  • Selenium, JUnit, Hamcrest, and Apache Commons IO libraries downloaded: you can find the zip. File here:

  • Aqua test case created with necessary test data for browser and OS configurations

  • Downloaded and installed browser extension .

Steps to Set Up and Execute Tests

1. Setting Up the Environment

Please make sure you place the files in proper directory (within the powershell agent folder as in the screenshot below).

  1. Install Java JDK:

    • Download and install the latest version of Java JDK on the server running the PowerShell agent.

  2. Download Selenium:

    • Extract the contents into a folder named Selenium inside the PowerShell agent directory.

  3. Download JUnit and Hamcrest Libraries:

    • Place the downloaded JAR files into the PowerShell agent directory.

  4. Create an empty folder "Temp".

  5. Download Apache Commons IO:

    • Download the org.apache.commons.io.jar and place it in the agent directory. Alternatively, ensure it is declared in the classpath.

  6. Run Selenium Server:

    • Start the server with the command:

      java -jar selenium-server-4.23.0.jar standalone

2. Configuring aqua

  1. Login to aqua:

    • Access your aqua account and log in.

  2. Create a Test Case:

    • Navigate to the test cases section and create a new test case.

  3. Add a Test Step:

    • Inside the test case, create a new test step.

  4. Add PowerShell Automation:

    • Configure the test step to use PowerShell for automation.

  5. Upload PowerShell Script:

    • Copy the PowerShell script contained in execute.ps1 to the aqua PowerShell automation step.

  6. Upload Java Files:

    • Upload TestLoginTest.java as attachment to the PowerShell step. This file contains the test logic and logging utility.

3. Setting Up Test Data

  1. Add Test Data to the Test Case:

    • Include the following test data parameters to control the OS and browser configurations:

      • BrowserName

      • BrowserVersion

      • OS

      • OS_Version

    • These parameters are used in TestLoginTest.java to specify which environment the test should run on.

4. Executing the Test

  1. Start the Powershell agent.

  2. Run the Selenium IDE browser extension.

  3. Start the java server using cmd.

  4. Compile the Java Files:

    • Ensure the PowerShell script (execute.ps1) compiles the Java files using the javac command with the appropriate classpath that includes all required libraries and classes.

  5. Run the Test:

    • Execute the test through the aqua interface. The PowerShell script will run, compiling and executing the Java test files.

Example PowerShell Script (execute.ps1)

# Get Parameters from aqua
param($variables, $tempDir, $aquaCallback)  
 
$OutputEncoding = [Console]::OutputEncoding
 
####################################
# Construct classpath for Selenium #
####################################
 
# Set Java-Classpath and send to aqua-Log
# $classpath = "C:/Program Files (x86)/Selenium/libs/libs/*;C:/Program Files (x86)/Selenium/libs/selenium-java-3.141.59.jar;"+$tempDir+";"
$classpath = $tempDir+"\..\..\hamcrest_1_3\*;"+$tempDir+"\..\..\junit_4_13\*;"+$tempDir+"\..\..\Selenium\*;"+$tempDir+"\..\..\Selenium\selenium-java-4.23.0.jar;"+$tempDir+";"
$javaFiles=Get-ChildItem -File -Filter "*.java"
 
$aquaCallback.SendMessage($tempDir, [aqua.ProcessEngine.WebServiceProxy.ExecutionLogMessageType]::InformationalDebug, "PowerShell"); 
$aquaCallback.SendMessage("Classpath: "+$classpath, [aqua.ProcessEngine.WebServiceProxy.ExecutionLogMessageType]::InformationalDebug, "PowerShell");
 
#################################################
# Inject Parameters from aqua-Variables-Manager #
#################################################
 
$fileStr = $tempDir+"\RemoteTest.java"
#$aquaCallback.SendMessage("File: "+$fileStr, [aqua.ProcessEngine.WebServiceProxy.ExecutionLogMessageType]::InformationalDebug, "PowerShell"); 
$tempFileStr = $tempDir+"\Temp.java"
#$aquaCallback.SendMessage("Temp-File: "+$tempFileStr, [aqua.ProcessEngine.WebServiceProxy.ExecutionLogMessageType]::InformationalDebug, "PowerShell");
 
foreach ($var in $variables) {
	$aquaCallback.SendMessage("Set Parameter "+$var.Name+ " to "+$var.Value, [aqua.ProcessEngine.WebServiceProxy.ExecutionLogMessageType]::InformationalDebug, "PowerShell"); 
	$replaceString = "%"+$var.Name+"%"
 
	Get-Content $fileStr | Foreach-Object {$_.Replace($replaceString, $var.Value)} | Set-Content $tempFileStr
	If (Test-Path $fileStr){
		Remove-Item $fileStr
		move-item -path $tempFileStr -destination $fileStr
	}
}
 
# replace variable %browserstack% so that settings of browserstack are used
$aquaCallback.SendMessage("Replace %browserstack% for online execution on Browserstack", [aqua.ProcessEngine.WebServiceProxy.ExecutionLogMessageType]::InformationalDebug, "PowerShell"); 
Get-Content $fileStr | Foreach-Object {$_.Replace("%browserstack%", "true")} | Set-Content $tempFileStr
If (Test-Path $fileStr){
    Remove-Item $fileStr
    move-item -path $tempFileStr -destination $fileStr
}
 
################
# Compile Test #
################
 
# javac -encoding UTF-8 -cp "$classpath" -d . $tempDir/*.java 2>&1 > execution.log
$aquaCallback.SendMessage($PWD, [aqua.ProcessEngine.WebServiceProxy.ExecutionLogMessageType]::InformationalDebug, "PowerShell");
javac -cp "$classpath" -d . $javaFiles 2>&1 >> execution.log
 
################
# Execute Test #
################
 
$aquaCallback.SendMessage("Going to execute selenium tests", [aqua.ProcessEngine.WebServiceProxy.ExecutionLogMessageType]::InformationalDebug, "PowerShell");
 
# Run JUnit with Selenium-Script and log to test.log
java -cp "$classpath;." org.junit.runner.JUnitCore RemoteTest 2>&1 >> execution.log
 
########################
# Send results to aqua #
########################
 
# Read Execution-Result
$result = $LastExitCode
 
$aquaCallback.AddExecutionAttachment($tempDir+"/execution.log");  
$aquaCallback.SendMessage("Execution Finished with result: "+$result, [aqua.ProcessEngine.WebServiceProxy.ExecutionLogMessageType]::InformationalDebug, "PowerShell");
 
# Send Log to Attachments which is created by the java code
# If (Test-Path $tempDir+"/test.log"){
    $aquaCallback.AddExecutionAttachment($tempDir+"/test.log");
# }  
 
# Parse Log
foreach ($line in [System.IO.File]::ReadLines($tempDir+"/test.log")) {
	if($started) {
		if($line -cmatch "STOP") {
			$started = $true;
			break
		}
		$split = $line.Split(";");
		$date = $split[0]
		$level = $split[1]
		$message = $split[2]
		$screenshot = $split[3]
		if($level -match "INFO") {
			$levelstring = [aqua.ProcessEngine.WebServiceProxy.ExecutionLogMessageType]::InformationalInfo
		} elseif ($level -match "DEBUG") {
			$levelstring = [aqua.ProcessEngine.WebServiceProxy.ExecutionLogMessageType]::InformationalDebug
		} elseif ($level -match "ERROR") {
			$levelstring = [aqua.ProcessEngine.WebServiceProxy.ExecutionLogMessageType]::ExecutionError
		} elseif ($level -match "WARN") {
			$levelstring = [aqua.ProcessEngine.WebServiceProxy.ExecutionLogMessageType]::InformationalWarn
		} else {
			$levelstring = [aqua.ProcessEngine.WebServiceProxy.ExecutionLogMessageType]::ExecutionError
		} 			
		if($screenshot) {
			$aquaCallback.SendMessageWithScreenshot($message, $tempDir+"/"+$screenshot, $levelstring, "Selenium");   
		} else {
			$aquaCallback.SendMessage($message, $levelstring, "Selenium");
		}
	}
	# Loop for starting Line
	if(!$started) {
		if($line -cmatch "START") {
			$started = $true;
		}
	}
}
 
# Cleanup - Does not work
Remove-Item .\screenshot* -include .png -force
Remove-Item .\* -include .class -force
Remove-Item .\test.log -force
 
# Return Result
if ($result -gt 0)
{
    $aquaCallback.SendMessage("Failures detected. See attached log for details.", [aqua.ProcessEngine.WebServiceProxy.ExecutionLogMessageType]::InformationalDebug, "PowerShell"); 
    return "Fail";
}
else
{
    $aquaCallback.SendMessage("All tests passed.", [aqua.ProcessEngine.WebServiceProxy.ExecutionLogMessageType]::InformationalDebug, "PowerShell"); 
    return "Ready"
}

Notes

  • Ensure the paths in the PowerShell script are correctly set to the locations of the Selenium, JUnit, Hamcrest, and Apache Commons IO libraries.

By following these steps, you will successfully set up and execute Selenium tests within the aqua environment.

Download the Selenium Java client library from .

Download JUnit and Hamcrest from the .

Download the Selenium standalone server from .

🌀
Selenium's official website
JUnit official download page
Selenium's official website
here the article
Selenium IDE
30MB
SeleniumJunitLibs.zip
archive
5KB
PowerShell_Selenium_SampleScript.zip
archive