# 2.2 - Web Testing

Web Testing — Appvance IQ documentation.

# Web Testing with AIQ

## Contents

- [Web Designer (new in AIQ 5.0)](/books/22-web-testing/page/web-designer-wx0)
- [Web Designer (Classic)](/books/22-web-testing/page/web-designer)
- [Instant Replay](/books/22-web-testing/page/instant-replay)
- [JS Edit &amp; Play for Web Testing](/books/22-web-testing/page/edit-and-play-javascript-steps-for-web-testing)
- [SmartTag Workbench](/books/22-web-testing/page/smarttag-workbench)
- [Network Workbench](/books/22-web-testing/page/network-workbench)
- [Validation Workbench](/books/22-web-testing/page/validation-workbench)
- [Visual Accessors for Web Testing](/books/22-web-testing/page/visual-accessors-for-web-testing)
- [Global JSON File](/books/22-web-testing/page/global-json-file)
- [Comparing PDF Files](/books/22-web-testing/page/comparing-pdf-files)

AIQ provides functional, load &amp; performance, and security testing for web apps and websites.

AIQ enables you to test websites and web apps, from UI to API, as part of your continuous testing program. Launch a complete set of functional tests (integration, smoke, and regression tests) as well as performance and app pen tests using the same test assets developed in any of AIQ’s test creation modules—AISG, Test Designer, Automatic Regression Testing, and Services Workbench.

Leverage the most complete solution for guaranteed quality. Move fast, release confidently.

AIQ enables you to meet all your end-to-end web testing needs whether you need functional, integration, performance, load, or security testing capabilities. Test cross-browser compatibility easily in multi-browser execution scenarios or test website appearance on mobile platforms.

Support use cases like uploading files, validating CSS, testing drag &amp; drop actions, or an array of other complex functions. You can even use scripts you may have written in other languages or frameworks, for maximum flexibility.

- Chrome, Firefox, Safari and Edge
- HTML5, AngularJS, REACT, AJAX
- Use tests developed in Web Designer or via AISG
- Execute tests in your CI/CD pipeline
- Functional, performance and security testing
- Support for running scripts created in other languages and frameworks
 
Capture self-healing tests for use with advanced, complex, modern web technologies using AIQ’s codeless Web Test Designer. Test your sites with AI-generated tests via the exploratory AISG or Automatic Regression tests. Employ both UX and API testing and timings. Reproduce issues for easy resolution using our Instant Replay technology. Get accurate results with implicit wait times built in.

Run tests that reflect the way your users behave.

AIQ supports dynamic web apps and sites, assuring reliability and effectiveness so you can keep your business secure. Data-driven testing validates your key transactional processes.

Currently, there are two web testing interfaces:

- [Web Designer (new in AIQ 5.0) ](/books/22-web-testing/page/web-designer-wx0#Web)
- [Web Designer (Classic) ](/books/22-web-testing/page/web-designer)
 
<div id="bkmrk-last-updated%3A-april-">---

Last updated: <span class="mc-variable General.NewDateTimeVariable variable">April 12, 2024</span>

If you have any feedback on this topic, please contact us at <documentation@appvance.ai>

</div>

# Web Designer

There are major changes and enhancements to the user interface for creating, maintaining and executing web tests in the 5.0.0 release of AIQ.

This document is meant as a quick start guide to help acquaint you with the new Web Designer and explain the basic components in the interface.  
  
[You can watch a video introducing you to the features and benefits of the new Web Designer.](../../Resources/Video/WebDesignerIntroVideo.mp4)

Here is a comparison between the Web Testing menu options in AIQ 5.0 and previous AIQ releases.

<table id="bkmrk-aiq-5.0.0-aiq%C2%A04.10.x" style="width:100%;"><colgroup><col style="width:312px;"></col><col></col></colgroup><tbody><tr><th>AIQ 5.0.0

</th><th>AIQ 4.10.x (and older)

</th></tr><tr><td>![7dZMk1QDS6b1CN7p-7aca16411fdc.png](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/7dZMk1QDS6b1CN7p-7aca16411fdc.png)

</td><td>![6sgIS5TCNqJ6bblh-155dd342d8a1.png](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/6sgIS5TCNqJ6bblh-155dd342d8a1.png)

</td></tr></tbody></table>

- **Web Designer** is the new user interface.
- **Web Designer (Classic)** is Deprecated.

See [Web Testing User Interface Overview for an explanation of the differences between the new and classic interfaces.](https://docs.appvance.net/Content/AIQ/AIQ5WebDesigner/WebDesigner_NewUI_Intro.htm)

For your convenience, the information about the new Web Designer interface is included in the [**AIQ 5.0.0 Release Summary**](../../Resources/PDF%20Attachments/AIQ500_ReleaseSummary.pdf). This document also contains the AIQ 5.0.0 Release Notes, which includes information about the AIQ 5.0.0 release.

---

Last updated: September 17, 2024

If you have any feedback on this topic, please contact us at <documentation@appvance.ai>

# Web Designer

This is the AIQ Web Designer.  
  
[![image.png](https://docs.appvance.net/uploads/images/gallery/2026-08/scaled-1680-/jFH41lXqjEPH6XnJ-image.png)](https://docs.appvance.net/uploads/images/gallery/2026-08/jFH41lXqjEPH6XnJ-image.png)

Web Designer allows the user to:

1. Record a script by interacting with the AUT
2. Edit existing text created by AISG or GENI
3. Run and edit existing scripts (for example, using the "Record From Here" option to add missing steps, or modify the script to accept new modules added to the AUT)

There are three main sections in the Web Designer:

- Top Section — set options and interact with your scripts.
- Web Designer Grid — create and edit test scripts.
- Bottom Section — access logs and data.

---

Last updated: March 17, 2024

If you have any feedback on this topic, please contact us at <documentation@appvance.ai>

# Use Instant Replay to Review Web Test Failures

How about Recording Network activity in the background while you are recording your UX test cases using Test Designer?

Test Designer Instant Replay is the answer. Yes, Test Designer Instant Replay can capture all your network activity while a use case is getting recorded in Test Designer and it can be exported as a .zip (with HAR and contents of the page), CSV file that has details of the method, port, vhost, uri, status and also as an executable JS fie.

API Testing Process:

When an API request is done, Test Designer tells the browser to do the request, but it injects a header to capture and provide the API calls.

With the option, Exclude requests matching the following regular expressions(comma separated): with default values of (.\*\\.(jpeg|png|gif|bmp|svg|css|js|gif|woff2|jpg).\*), will filter out all those files with the mentioned extensions, you can remove or add or make any changes to these extensions depending on the requirements.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/bZ3LnZhF4jUHFEkr-abfe3dcbfb3b.png)<u>Navigation:</u>

From the dashboard page, Under Record, Click Test Designer Instant Replay.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/60LKoYwf7m7QmZ9C-e48c16e02407.png)<u>File Menu:</u>

1. Open: Only allows .zip files. When you save the file after having some traffic recorded, File &gt; Saving will save the file with a .zip extension or when you do a File &gt; Export to HAR, it will save with a .zip extension. File residing in the local machine can be opened using File &gt; Open.
2. Save: Is used to save the file after changes or a new unsaved file.
3. Save As: Is used when you want to do a Save As of an already opened file with a different file name.
4. Comparison Report: Two Instant replay zip files can be compared to check the differences between the Response body, Headers, Payloads.
    
    Typically used for the same type of flows, with different login details, or with different environments to check the differences between Response bodies, headers, or payloads.
5. Export :
 
## Comparison Reports

To generate the comparison report, you first need to load the open the instant replay file to compare against baseline data by making use of File &gt; Open and open the zip file that is saved as the instant replay of the script.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/H04OzNHDh2jHWuQu-1916a90d28e4.png)Click File and choose Comparison Report from the Drop-down.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/UKZlvXv8A7a2rAQN-41b36df1a24b.png)API Comparison pop-up would be displayed to choose the baseline data to file Instant Replay (.zip file) with the Browse button.

Maximum payload size (chars): would default to 4096 chars but that is something that can be changed and allows only numerical entries.

Start Comparison button would be enabled, clicking which will download a zip containing all the reports.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/PEcabdHFeh8dM30u-5c6537e97c43.png) ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/EAdsAIzIPg1sLxmP-0d40a13749ec.png)It is required to extract the downloaded zip content of the files and open the generated .html file.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/TipQ4tSLIKp8TjaT-121d06750e54.png)Below is the comparison report that is going to be generated, which will show the comparison report file name, the files that are used for comparison, and the maximum data size.

It displays all the Requests along with the size, Response Body and the differences for each of the rows which can be expanded/collapsed, Headers and request/response header differences which can be expanded/collapses for each of the rows, Payload with differences for each of the rows which can be expanded/collapsed.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/3Ip6IecWdMPUaXaB-cac5c715c305.png)There is an option to hide or show the row numbers.

Also, the option to choose a particular column that needs to be displayed.

You can click each of the buttons like "response headers diff" for example to check the differences.

- "-" means no data found
- The green color means some data has been added
- The red color means some data has been removed or not found
 
 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/Yrqw0rAiWFOfBg0m-038983b07898.png)6\. Export: The recorded traffic can be exported to 3 different formats.

a) HAR: downloaded as a .zip file, contains the har calls "Record.har" plus all the history containing .jpg's, .html's, txt's, .dat's, .json files etc

b) CSV: Contains details of the method, port, vhost, uri, status. This CSV can be used as a log from Appvance AI as well

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/K7dxSyLvoHNgvvI5-71cd08860068.png)c) JS: A executable JS Script with all the gets and posts like the one below

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/AlAxURq3xZOGyNs4-1ef6f9d3908b.png)<u>Actions Menu: </u>

1. Start Recording: will start recording HAR traffic for the app that will be recorded using Test Designer IDE.
2. Re/Start Playback: will clear the historical data which is already present and make a fresh recording of the requirement for playback.
3. Stop: will stop recording HAR traffic calls.
4. Clear History: will simply clear your recording area and it will be ready to record new HAR traffic.
5. Show calls: This is more like a refresh button, that keeps updating the new traffic that got recorded.
 
<u>Status:</u>

You will see Status on the top right corner of the page, Initially Status will be Standard.

When you click Start Recording from the Action menu bar Status will change to Record, and Again, Status will be Standard when you click Stop from the Action menu bar.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/kln0WPSfeQ4BdErx-c8b9194bceaa.png)<u>How to use Test Designer Instant Replay</u>

Follow these steps:

1. Go to Instant Replay and click Start Recording from the drop-down.
2. Go back to Test Designer IDE and begin Recording by clicking Record &gt; choose a browser and perform your UX actions.
3. Come back to Instant Replay and click Show calls from the Action Menu, you will notice all the traffic that is getting captured.
4. Once done with all the recording, you can go ahead and save the file as a .zip file or any other 2 formats mentioned above.
5. Not just recording, Test Designer Instant Replay also records the history calls when we playback scripts from Test Designer.
6. Go back to Test Designer IDE, open any existing script, come to Instant Replay, click 'Start Recording' and playback the script from Test Designer IDE, and you can click 'Show calls' from the Action menu, you will notice all the traffic that it got created.
7. These traffic logs can be used to generate more traffic when running as a performance test (running at the protocol level) using along with the actual Test Designer script (running at the browser level).
 
 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/B2EXY2JHcQpCu4HH-031022225a57.png)<div id="bkmrk-last-updated%3A-august">---

Last updated: <span class="mc-variable General.NewDateTimeVariable variable">August 28, 2023</span>

If you have any feedback on this topic, please contact us at <documentation@appvance.ai>

</div>

# Edit and Play JavaScript Steps for Web Testing

JS Edit &amp; Play is a tool within Test Designer that is completely JavaScript. Using this tool you can write custom code, add conditional statements, add loops, and create any complex scripts using JS Edit &amp; Play like you would using IDEs such as Netbeans or Eclipse.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/7xb5knjV7OdE2o0X-be9aedbae166.png)

In JS Edit &amp; Play, you can have can open multiple files which open in different tabs which makes it easy for the user to copy contents between different scripts.

JS Edit &amp; Play also has IntelliSense, which is a code-completion aid. That means as you type, the default methods and functions along custom-defined variables and functions are available to select from the drop-down.

Note: Test Sesigner services must be running to work with JS Edit &amp; Play.

## Accessing JS Edit &amp; Play

There are multiple ways to access JS Edit &amp; Play.

### Option 1

1. Open the Test Designer IDE
2. Open any existing Test Designer script or record a new script
3. Click **File** &gt; **Export** &gt; **JavaScript**.
4. Click **Save** to save the script. The script will have a .js extension.
5. Click **Play**.
6. The Test Designer JS Edit &amp; Play window will open with the script opened. From here you can edit the script, add more JS steps, and perform other actions.
 
### Option 2

1. From AIQ navigate to **Test Designer** &gt; **JS Edit &amp; Play**.
2. From here you can create a new script or open an existing script.
 
## Related Topics

The following topics provide more information on the JS Edit &amp; Play user interface and details and examples of working with scripts in the tool.

[JS Edit &amp; Play for Web Testing User Interface - Information about the following menus and functions:](https://docs.appvance.net/Content/AIQ/TestDesigner/TestDesigner_JSEditPlay_Controls.htm)

- File menu
- Options menu
- Export logs option
- Check Syntax option
- Play Script option
 
[Working with JS Edit &amp; Play ](https://docs.appvance.net/Content/AIQ/TestDesigner/TestDesigner_JSEditPlay_Working.htm)

- Debugging in the Console
- Custom Functions in JS
- Script Examples
- Exporting DS Script with Descriptions to JS
 
## &lt;!\[CDATA\[ \]\]&gt;

<div id="bkmrk-last-updated%3A-july-2">---

Last updated: <span class="mc-variable General.NewDateTimeVariable variable">July 25, 2023</span>

If you have any feedback on this topic, please contact us at <documentation@appvance.ai>

</div>

# SmartTag Workbench Reference

SmartTags are one of the unique features of Appvance IQ, SmartTags are collection of objects and their properties. This collection contains key-value pairs; the key being a logical name identifying the set of objects, and the value contains unique objects properties (ex: Valid HTML tags, SmartTag Type, Rules) that are used to identify the object on the web page.

One of the main burdens of an automated UI test script is the amount of maintenance needed when object properties change within the application under test. A very common way of minimizing the time it takes to update your automated test scripts is the use of a SmartTags Library. A basic SmartTag library can be implemented as a collection of key-value pairs, with the key being a logical name identifying the object and the value containing unique objects properties used to identify the object on a screen. This can be used in Test Designer scripting, JS scripting, and also during Appvance AI scans as Appvance AI supports creating application AISG using the SmartTag Library created.

For information on SmartTags for testing mobile applications, see [SmartTag Workbench for Mobile Testing. ](https://docs.appvance.net/Content/AIQ/MobileTesting/SmartTagWorkbench/MobileTesting_SmartTagWB_Main.htm)

## Accessing the SmartTag Workbench

In AIQ navigate to **Web Testing** &gt; **SmartTag Workbench**.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/MSsSigSuPjwtEGy8-39ec9b0ccf2c.png)

### SmartTag Summary Tab

The summary tab gives the summary of all defined SmartTags, actions, extractors, and validations.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/nwhaF5hS7mFzAauM-4b003f4d4e6c.png)- You can use the summary tab to Search the SmartTags using the search option, which applies for Actions, Extractions, and Validations
- SmartTags can be selected using SmartTag type, by navigation, action, etc
- Show Invalid SmartTags only can be used to get all the invalid SmartTags
- Has option to disable or enable definitions, Disable all of them can be used to disable all the SmartTags or validations, etc
- Columns can be sorted
- The summary will provide details and links for the actions used, extractors used and validations used
- Mouse hover on a SmartTag name will show the description of a SmartTag
 
 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/VylPJIoV42V9G7NB-fc523f52f581.png) ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/7uXY6qBYEKXU689E-e239e0974fa4.png) ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/538dleexNfxLl7h3-3c38133d0418.png)### SmartTag UI 

The SmartTag Library tab allows you to create and configure SmartTags to be used for Test Designer or JS or Creating AISG more quickly. This is the place to edit your .json configuration files for the SmartTag library. The SmartTag Library tab allows to create, edit and delete SmartTags. This is a .json file. Will have .stags as the extension.

## Creating a new SmartTag 

To create a new SmartTag, simply fill all of the required input fields of the form and then click the "Add" button located at the top right of the container window. Make sure to fill up the following required inputs to be able to add a new SmartTag:

- SmartTag name
- At least one valid HTML tag
- SmartTag Type
 
All the other inputs and data of the form are optional based on your needs, such as the rules, however, to create a new SmartTag you will always be required to provide the above input data. If you have selected a SmartTag from the "SmartTags List" selector and you want to create a new SmartTag, click the "SmartTags List" selector and select the first option called "Create New SmartTag", this will reset the SmartTags form and allow you to create a new SmartTag from scratch.

### Manage Valid HTML Tags 

The list of valid HTML tags is a static list of elements referenced from W3School's valid HTML tags list. However, if you need to add a custom HTML tag, you can do so by clicking the plus sign ("+") located beside the valid HTML tags selector label. This will prompt a modal window where you can type in the custom HTML tag to be added to the list of valid HTML tags of the current context.

You must follow the [W3C Custom Elements standard](https://www.w3.org/TR/custom-elements/) for custom HTML tags such as hyphenation to add a valid HTML tag.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/dNQ6EY3ePT5CvCQH-2e22a6b879d0.png)### SmartTag Description

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/iPq72QDDCNGhR7Nm-69af5f3098cd.png)SmartTag descriptions can be used to provide meaningful descriptions for the SmartTags created that way it will help others in the team to check back on those descriptions to understand the SmartTags better.

### Manage SmartTag Type

The SmartTag Type selector allows selecting the type of SmartTag you want to configure, based on the selected SmartTag Type, the available methods of the Methods and Actions table will toggle, each of the rule types have their own set of methods associated with. By default, when you are creating a new SmartTag or resetting the SmartTag form, the SmartTag type "Prop" will be selected. Once you have selected the desired SmartTag type, you can bind existing Actions to the available methods, all of the created actions so far in the current context will be available in the methods Action selectors at the Methods &amp; Actions table at the bottom of the SmartTag container window.

Here's the list of methods linked to each of the available SmartTag types:

- Prop: getName
- Navigation/Action/RadioButton: getName, click
- Check: getName, setChecked, isChecked
- Select: getName, getValues, getSelectedValue, setSelected
- Form: getName, submit
- Text: getName, setText, getText
- Menu: getName, expand, collapse
- Search: getName, submit, setValue
- Hover: getName, mouseHover
- Noise: getName, click - The noise SmartTags were created for elements like pop-ups that can happen randomly on an application. A click to a noise SmartTag will create a clickIfFound() Test Designer command that will not fail if the element is not found.
- AutoClosableElement - This is for pop-ups, it is just a SmartTag for the close icon of the pop-up
 
 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/CEeQKyMd1y8cuCLq-638c74f28444.png)### Manage SmartTag Rules 

To add rules to your SmartTag, simply click the "Add Rule" button located under the "Rules" section, this will automatically add a new rule to the SmartTag, you will see the default rule type input fields displayed, these inputs will change depending on the rule type selected, meaning that based on the selected rule type you will be given a different kind of inputs and options to configure the SmartTag rule properly. Here's the list of available rule types and their corresponding input fields and restrictions:

- attrContainsValue/attrDoesNotContainValue: This is a key-value rule type, meaning that whenever you select one of these rule types you will be given two input fields, the first one is for the attribute key and the second one is for the attribute value. Please notice that for this rule type it is only required to have a key, you can add this type of rule without an attribute value, but it always has to provide a key to be a valid rule (I.E. empty HTML attributes like 'disabled')
- containsText: This is a text-based rule type, when you select this rule type you will be given a standard text input field, it is always required to have a value to be a valid rule.
- childSmartTag/parentSmartTag/parentsSmartTag: This kind of rule type is bound to the available SmartTags list in the current context, you will be given a selector filled with the list of available SmartTags created so far. You must always select a single SmartTag to be a valid rule.
- childTag/parentTag/parentsTag: These kinds of rule types are bound to the available valid HTML tags list in the current context, you will be given a selector filled with the list of available HTML tags, you must always select a single valid HTML tag to be a valid rule.
- containsHtml: Evaluates and matches the given HTML data with that of the accessor.  
    For example: &lt;li class="navear" item-name="prop" id ="id2"&gt;  
    If the above data is given in containsHTML rule in SmartTag json , while scanning the elements , it will try to match the given value with that of element's HTML data (outerHTML data of element) and returns the element.
 
To change a Rule Weight you can interact with the "Importance" slider of each rule container, the slider label will dynamically change based on the slider value so you can know exactly which is the rule weight.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/6bHHlJ9x1Spx5kvX-e1b75f35bd13.png)To Remove a Rule simply click the "Remove" button located at the rightmost of the rule container.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/CKDaEAb0EyHzrq9B-6b388dc47cab.png)### Updating a SmartTag 

File &gt; Save and File &gt; Save As can be used to save the modified changes.

To Remove a SmartTag, select a SmartTag from the "SmartTags List" selector and click the "Remove" button and click save.

SmartTags can be duplicated using the Duplicate button copying all the same contents and it will add a "SmartTagName-copy" and you can use the SmartTags to change or modify the SmartTags.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/7qoWw8YFvbEQxFgj-cd4478b3d834.png)### Actions Tab UI 

Actions are used when you want to override the default behavior of a SmartTag.

For example, navigation's default action would be CLICK

if you need to change the default action, so if you need to click a specific area instead of a full click, a custom action could be created to perform this, and always remember to assign the action that was created in the Actions tab.

Actions tab allows you to create and configure Actions to the current context that can be bound with the SmartTag methods at the Methods &amp; Actions table of the SmartTags Library tab.

You must use JQuery or JavaScript methods on the Action tab. Commands documented in [Test Designer JS Commands Reference are not valid in the Actions Tab. However, those commands can be used in the Validations tab.](https://docs.appvance.net/Content/AIQ/TechRef/TestDesignerJSCommands/Test_Designer_JS_Commands_Reference.htm)

To create a new Action, type in the action name and the corresponding JavaScript function string and click the "Add" button located at the top right corner of the Actions tab container window. Make sure to fill up the following required inputs to be able to add a new action:

- Action Name
- JavaScript Function String
 
Once you have added the Action, it will be available at the Actions selectors of the Methods &amp; Actions table of the SmartTag tab. If you have selected an Action from the "Actions List" and you need to create a new SmartTag, click the "Actions List" selector and select the "Create New Action" option, this will reset the Actions form and allow you to create a new Action.

/\*\* You can create custom actions for SmartTags here.

- Your available variables are:
 
- \- element: The Element is the SmartTag name
 
- \- params: The input parameters of the function if any
 
- \- ds$: Equivalent of the jQuery accessor "$"
 
\*

- E.G.: To get the selected values of a select HTML tag type:
 
\*

- return ds$("option", element);
 
\*\*/

The array hint field is optional.

To update an Action is the same as the SmartTags Library tab functionality, you first have to select an Action from the "Actions List", modify the configuration as required, and then click the "Update" button.

To Remove an Action, select the action from the "Actions List" and then click the "Remove" button.

Example:

React Selects

Suppose there is a control that behaves like a Select, Drop-Down list, or Combo box but its HTML structure does not follow the standard, select, and option tags, but instead uses nested div tags. A Select type SmartTag allows the following interactions or functions: show values, get all values, get the selected value, and set value. Since the control does not follow the standard, the default implementation for the functions of Select type SmartTags will not work. Therefore, a custom implementation for each function must be provided.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/pyNvbnF0MaC1ewdD-a9bd8e1f29fe.png)Notice the getValue, getSelectValues and setSelected functions are bound to custom functions

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/5R5OSZm3yXUCNkcD-dc4c38f9210c.png)Custom implementation for getValue which is set to use reactGetSelectValue

### Post Actions &amp; Previous Actions 

Post Actions &amp; Previous Actions selectors have linked with the "Actions List" selector, meaning that whenever you create or delete an action, this change will take place at all of the form selectors. These selectors allow you to bind multiple posts and previous actions to the current action in scope previous actions will be executed before the current action, and post actions will be executed after the current action.

### JavaScript Function String 

As the name suggests, a string representing a JavaScript function, this field is a JavaScript editor embedded in the UI that allows you to edit the JavaScript code professionally, providing coding tools such as code highlight, auto-close brackets, line numbers, and so on. It's important to notice that you must not include the function declaration, only the function body, this is part of Create AISG implementation under the hood, you must only code the JavaScript function body.

Note: All the SmartTags have getName which gets the accessors, we could override the getname so that the string that we get is not ambiguous for the Test Designer.

### Extractors

Extractors are a type of validation that allows you to extract data from SmartTags.

The extraction process can occur before a SmartTag is processed or after a SmartTag is processed (Processing means the execution of the SmartTags)

You can extract many types of data, like the text of a SmartTag, the id of a SmartTag, various attributes of a SmartTag by providing the attribute name, you can also extract XPath's data by using xpath expressions.

Following are the ones that we could extract.

- Text
- Attribute
- ID
- Xpath
 
You can also provide customized JS code that allows you to extract many different elements from the whole page.

All the data that you extract are stored in a variable using the variable name.

As already mentioned there are pre and post actions:

An example of a pre-action could be a link where you need to get the text and store that value to be used for further processing or further validations.

Post Action extractors are something that you could store in a setValue, and after setting the value you could validate what was set as the input for those accessors using Post extractions.

You could also use JS code like the one below:

/\*\*You can add JS code here.

- Use standard functions to manipulate the variable.
 
- Variable must be referenced with $.
 
- Use functions available in JS Edit &amp; Play to extract data.
 
- Reference of functions is in [Test Designer JS Commands Reference](https://docs.appvance.net/Content/AIQ/TechRef/TestDesignerJSCommands/Test_Designer_JS_Commands_Reference.htm)
 
- Note: The first line must return value.
 
\*\*/

Examples of Pre-Action Extractor and a Post-Action Extractor below using Text:

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/cNfYB5wzpMVjDy7e-be8c40286858.png) ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/W4mVSiO755ZRQeYe-f1cfd154e43b.png)### Validations 

Validations allow the extraction of data from a SmartTag and compare this data before or after a SmartTag is processed against a target that can be a variable from a previously executed Extractor or a valid JavaScript expression or a value.

Comparisons can be:

- Equals - equals
- Not Equals - notEquals
- Contains - contains
- DoesNotContain - doesNotContain
- Less Than - lessThan
- Greater Than - greaterThan
- Less or Equal - lessOrEqual
- Greater or Equal - greaterOrEqual
- Starts With - startsWith
- Ends With - endsWith
 
The importance of having a validator is that they have the flexibility of choosing different kinds of assertions compared to auto-validations before or after a SmartTag is executed.

As Extractors, you could choose the validators to be executed pre or post after a SmartTag is processed.

Different types of Validations are supported on:

- Attribute
- Text
- Id
- Xpath
 
Expected Value (JS Code): Expected string or the expected value to be entered.

Examples:

validating numbers - 257

validating text - "helloworld"

validating true/false - true or false values

We could also provide functions like - parseint(23)

parsestring("string").uppercase(); etc

Also, we could use the extractors to validate by invoking the defined extractors in the extractors tab just by using $ Symbol.

Hitting $ will invoke all the defined extractors from the extractors tab.

Some Examples Below:

Validation with Greater or Equal with Text Type and an Expected number value.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/XAVES158W2cbmoR8-70a089ed6a19.png)Validation with Contains Operator with Text Type and Expected string value.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/hpgEoAE6lsQ7GsGI-cf3f10abeb84.png)This is an example showing invoking an Extractor using the $ symbol.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/AUwHA2007vVc2vCB-e0c5686a181a.png)### Other Validations 

Other Validations allow determining the existence of a value or element after a SmartTag is processed. Before a SmartTag is processed, data is extracted from a SmartTag or the value of a previously executed Extractor or a specific JavaScript expression or value is loaded. After a SmartTag is processed, the value or the element is checked for its existence.

These validations always extract data from a SmartTag and after a SmartTag is processed, we validate the data against the resulting page or the specific element of the page.

The only assertion that we could do with other Validations is CONTAINS and DOES NOT CONTAIN.

This validation happens always after a SmartTag is processed.

Different Types supported:

- Attribute
- Text
- ID
- Static Text
- Element Exists
- Xpath
 
Targets:

- Particular Locator
- Present in Whole Page (Assert Contains)
- Not Present in Whole Page (Assert Does not contains)
 
Some examples are below:

Type of Static Text and with expected text value targeting the whole page.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/k3Du8WnuyBBurbA0-bb41a92e8d71.png)Type of Element Exist and provides the Locator value:

Note: The locator value is something that looks like the accessors from the Test Designer script.

Given this element: Login Button

&lt;a [ id="login\_link\_id" name="login\_name"&gt;Login&lt;/a&gt;](/login)

Valid Locators can be:

link("/login")

link("Login")

link("login\_link\_id")

link("login\_name")

link(1)

Can also use CSS and XPath locators like:

byXPath('//\*\[text()="Login"\]')

byCss("#taxonomies &gt; div:nth-child(2) &gt; a:nth-child(1)")

Native element types can be

link("")

textbox("")

emailbox("")

password("")

textarea("")

button("")

reset("")

span("")

submit("")

select("")

radio("")

checkbox("")

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/jPlJdZegmy8EAwot-de4684a74dd8.png)Type of Static Text expecting a string value from a Locator Target providing the Locator Value:

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/34e8I3s9t8bxZf3I-44874a5f6ea3.png)Type of Static Text expecting a string value (Extracted String value) from the whole page:

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/qsPsOTzRnMAuJQa7-b5742235eb47.png)Note: When running designer scripts, you would notice that the validations would be performed both pre and post-validations.

Test Designer logs example:

Evaluating PreAction Validation: HasButtonNewLookUp for SmartTag: shopThisStore

Validation succeeds.

Validations have both pre and post-sections. Generally, pre section will always be successful and the post-section shall pass or fail depending on the assertion.

Pre section defines a variable with the value:

- Id, Attribute, Text, and XPath will extract this data from the SmartTag
- Static Text will define the variable with the value provided in this field
- Element Exist will define the variable with the value provided in the Locator Value field
 
The post section performs the assertion based on the option selected in the Target field:

- Id, Attribute, Text, XPath, and Static Text will perform assertContainsText (Locator), assertTextPresent (Present in Whole Page), and assertTextNotPresent (Not Present in Whole Page)
- Element Exist will perform assertExists
 
### Settings 

Settings are the most simple screen of the SmartTag UI, its purpose so far it's only to configure the SmartTag Rules Threshold, there's only a Slider control that allows you to change this threshold, by default it's 0.75. The range of this slider is from 0.0 to 1.0.

### Files Management

The SmartTags UI allows you to handle SmartTags configuration files, these are JSON files (.json extension) that contain a valid SmartTags configuration JSON. The file manager window is available through the "File" drop-down located at the leftmost top corner.

These are the available options:

- New: Creates a new SmartTag context to be persisted into a file. If you have loaded a file before its contents will be removed from memory.
- Open: Opens an existing valid SmartTag configuration JSON file.
- Save: Saves the current SmartTag configuration to a file, if you have opened a file before, the content will be persisted to the same file opened, if no file has been opened you must provide the file path and name.
- Save As: Save the current SmartTag configuration to a file, it always asks for the file name and path, it comes in handy when you open an existing file, modify its content, and then you need to save it with a different file name to keep the original untouched.
 
It is worth mentioning that the SmartTag UI will let you know when you have modified and opened the file and the changes have not been saved. When you open a file, the UI will display the file name right next to the "File" option of the file manager, if the file name label is in green color, it means that the file has not been modified since the last save (or not modified when opened), if the file name label is on orange color, it means that the file content has been modified but not yet persisted to disk, meaning that in-memory changes have not been saved to the file. To save the changes, use the "Save" option of the file manager.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/0seIsQ1EbcgeGHjp-c037a516bed8.png) ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/MF1SXOOpwFRVx3u2-d9f4163f4a5b.png)### SmartTag creation with an example application 

In this section, we shall learn about the following:

Valid HTML Tags

SmartTag Types

Scan Types

SmartTag Rules

Navigate to SmartTag Workbench under Record and click File &gt; New.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/4uYtPHCitvQS4Suc-a671e96aaf02.png)The first step is to fill up the SmartTag name, fill up the SmartTag name with meaningful names according to the usage, for example, Left\_Menu\_Items, Credentials, Top\_Links are some valid names.

Valid HTML Tags

As we all know, everything you do on a web page is using tags. The basic format of a tag is this:

&lt;TAG&gt; (something) &lt;/TAG&gt;

For example, say I want to get a header, like the one above. Well, the code for that header is:

&lt;H1&gt;Tags: What are they? How do they work?&lt;/H1&gt;

Notice that the tag begins with: &lt;H1&gt; and ends with: &lt;/H1&gt;. This is an important aspect of tags. Almost all begin AND end.

Some valid HTML tags are defined at: [HTML Document Type](https://www.w3schools.com/tags/ref_html_dtd.asp)

Valid HTML Tag selection depends on the element that we are looking at, To see tags on the web page, right-click the web page or the target element and select Inspect as shown below.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/vOspxZ8dKFOS7szm-a3f54230e441.png)If the home link was our target element, you could check below that the valid tag for that is 'li', we could go ahead and select 'li' from the valid HTML tags. Also notice that it is a multi-select, you could choose more than one valid HTML tag.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/k5PvOuZIUTUOpEZ9-d19f9b828e58.png) ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/JpwyHX5ObOaffrRc-d27520a7a6ec.png)You could also notice a + icon next to Valid HTML Tags (+), it can be used to add any new custom HTML Tag Name to the default list from your application

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/DQADWZBbdhPRGgnn-d89e7ae7a143.png)### SmartTag Types 

A SmartTag can be of different types:

- Navigation: click the element and always navigates to the same site. For example, a home button that always redirects to the home page
- Action: Ask the user if he wants to click it or not. For example, a button to log in
- RadioButton: Select a radio button
- Check: Click a check-box
- Select: Get all the elements of a combo box
- Form: Similar to the standard HTML form, previous inputs are expected to be filled before the form is submitted
- Text: Detect a text field to input text
- Menu: Display the options of a menu
- Search: Specific type of form with only one input
- Hover: Make a Mouse Hover above the target element(s)
- Prop: This type of SmartTag is like "null", but it is used in parent SmartTags to create references
 
So depending on the element that you are looking for, a SmartTag Type should be chosen, for the example that we were working on, Navigation is the SmartTag Type that should be chosen (For the Home button) which navigates to a different page.

### Scan Types 

Scan Types are mostly used for scans that we perform in the AISG of the application creation.

Below are the 3 options available.

<u>Once per app:</u>

Check this option, If many navigation actions are redirecting to the same state, this option will consolidate them into just one for the entire site this strategy will reduce the scanning time and final file size as well.

<u>Once per page:</u>

Checking this option would make sense in cases such as a table containing details where all the SmartTags are mostly similar, AISG scan will process just the first occurrence by adding the action with the $SmartTag Name, this new capability will improve the AISG scan process and not repeating the same actions on that page.

<u>Singleton</u>:

This option is used for elements that only appear one time on the page.

### SmartTag Rules 

The available SmartTag rule types and short descriptive take some examples for each of the SmartTag rule types that are available so it is easy to understand.

- attrContainsValue/attrDoesNotContainValue: This is a key-value rule type, meaning that whenever you select one of these rule types you will be given two input fields, the first one is for the attribute key and the second one is for the attribute value. Please notice that for this rule type it is only required to have a key, you can add this type of rule without an attribute value, but it always has to provide a key to be a valid rule (I.E. empty HTML attributes like 'disabled').  
    For example, the button "Home" has the attribute "id = home-link".
 
 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/CvkIQttwtRyj5h4f-1c1d59b9f35e.png) ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/shgPnITuGLRtihCs-83ef7199cf20.png)- containsText: This is a text-based rule type, when you select this rule type you will be given a standard text input field, it is always required to have a value to be a valid rule.
 
For example, want to create a SmartTag for the "Next" button; select containsText and enter the text.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/0FchLrRxxzwjQcqG-7c629d2f24a2.png) ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/4nbRVQLSFfsMVJ3G-bc425e249869.png)- childTag/parentTag/parentsTag: This kind of rule type is bound to the available valid HTML tags list in the current context, you will be given a selector filled with the list of available HTML tags, you must always select a single valid HTML tag to be a valid rule.
 
For example, to create a childTag as a rule for the below-highlighted element, use the rule as mentioned:

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/NnUPCPyUBvTjVzrh-a590f08dd2ef.png) ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/AY2E4JqT5ZtkV5u2-3ba9e5f2f539.png)- parentTag: evaluate that the item has a parent with a specific tag. For example, to create a parentTag as a rule for the below element:
 
 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/jmf50wCx6NPab0FJ-57acd656bd64.png) ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/APALPyXW4Yd4Xk56-f5180e04f357.png)- parentsTag: evaluate that the item has many parents tags. For example, to create a parentsTag as a rule for the below element
 
 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/D5SVxdFZg45HRtmm-038eafe4fdec.png) ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/iFyTseJLvl9rqypw-348d7feb55c6.png)- childSmartTag/parentSmartTag/parentsSmartTag: These kinds of rule types are bound to the available SmartTags list in the current context, you will be given a selector filled with the list of available SmartTag created so far. You must always select a single SmartTag to be a valid rule.
 
 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/FBrMnbg1Z6ypNG6u-0e0d76031f18.png)### Try SmartTags in JavaScript/Test Designer 

Now we know how to create SmartTag for different elements of the web page and other uses, now it is time to create some JS scripts using those SmartTags that we created.

For the application, http://demosite.appvance.com , we created 2 SmartTags for the products and the Shop by Brands left menu as highlighted below.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/MBXijypJFpl2jwUV-f7d7236aa074.png)SmartTags created are shown below:

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/D6TMdinfaG9IMnQW-858d71d48693.png) ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/INvPVXI1kBQfMBKV-162f567c6ee2.png)### **Useful AISG custom action examples** 

1. GetName Custom Actions
    
    Get element text including the text of its children nodes.
    
    return ds$(element).text();
2. Get only the current node element text.
    
    This action does return the current element node text without adding the text of its children nodes. If you apply this to a SmartTag that targets a span(“Yes“), this will make sure your SmartTag only focuses on the actual span that has the “Yes” text and not on its span’s parents.
    
    <div class="codeSnippet"><div class="codeSnippetBody">```
    return ds$(element)<br></br>                <br></br>.clone() //clone the element<br></br>                <br></br>.children() //select all the children<br></br>                <br></br>.remove() //remove all the children<br></br>                <br></br>.end() //again go back to selected element<br></br>                <br></br>.text();
    ```
    
     </div> </div>
3. Get the element name from one of the element’s attributes
    
    The following template can be used to set a general getName function that checks for an attribute to get its value, but if it does not have that attribute then it tries with another one. Modifying the code can change the order in which the attributes get fetched or add more attributes.
    
    <div class="codeSnippet"><div class="codeSnippetBody">```
    var htmlElement = ds$<span style="color:#000000;">(</span>element<span style="color:#000000;">)</span>;<br></br>                <br></br>var name = htmlElement<span style="color:#000000;">.</span><span style="color:#795da3;">attr</span><span style="color:#000000;">(</span><span style="color:#df5000;">'id'</span><span style="color:#000000;">)</span>;<br></br>                <br></br><span style="color:#a71d5d;font-weight:bold;">if</span> <span style="color:#000000;">(</span>typeof name === <span style="color:#df5000;">'undefined'</span><span style="color:#000000;">)</span> <span style="color:#000000;">{</span><br></br>                <br></br>name = <span style="color:#df5000;">""</span>;<br></br>                <br></br><span style="color:#000000;">}</span><br></br>                <br></br><span style="color:#a71d5d;font-weight:bold;">if</span> <span style="color:#000000;">(</span>name === <span style="color:#df5000;">""</span><span style="color:#000000;">)</span> <span style="color:#000000;">{</span><br></br>                <br></br>name = htmlElement<span style="color:#000000;">.</span><span style="color:#795da3;">attr</span><span style="color:#000000;">(</span><span style="color:#df5000;">"value"</span><span style="color:#000000;">)</span>;<br></br>                <br></br><span style="color:#000000;">}</span><br></br>                <br></br><span style="color:#a71d5d;font-weight:bold;">if</span> <span style="color:#000000;">(</span>typeof name === <span style="color:#df5000;">'undefined'</span><span style="color:#000000;">)</span> <span style="color:#000000;">{</span><br></br>                <br></br>name = <span style="color:#df5000;">""</span>;<br></br>                <br></br><span style="color:#000000;">}</span><br></br>                <br></br><span style="color:#a71d5d;font-weight:bold;">if</span> <span style="color:#000000;">(</span>name === <span style="color:#df5000;">""</span><span style="color:#000000;">)</span> <span style="color:#000000;">{</span><br></br>                <br></br>name = htmlElement<span style="color:#000000;">.</span><span style="color:#795da3;">attr</span><span style="color:#000000;">(</span><span style="color:#df5000;">"name"</span><span style="color:#000000;">)</span>;<br></br>                <br></br><span style="color:#000000;">}</span><br></br>                <br></br><span style="color:#a71d5d;font-weight:bold;">if</span> <span style="color:#000000;">(</span>typeof name === <span style="color:#df5000;">'undefined'</span><span style="color:#000000;">)</span> <span style="color:#000000;">{</span><br></br>                <br></br>name = <span style="color:#df5000;">""</span>;<br></br>                <br></br><span style="color:#000000;">}</span><br></br>                <br></br><span style="color:#a71d5d;font-weight:bold;">if</span> <span style="color:#000000;">(</span>name === <span style="color:#df5000;">""</span><span style="color:#000000;">)</span> <span style="color:#000000;">{</span><br></br>                <br></br>name = htmlElement<span style="color:#000000;">.</span><span style="color:#795da3;">attr</span><span style="color:#000000;">(</span><span style="color:#df5000;">"placeholder"</span><span style="color:#000000;">)</span>;<br></br>                <br></br><span style="color:#000000;">}</span><br></br>                <br></br><span style="color:#a71d5d;font-weight:bold;">if</span> <span style="color:#000000;">(</span>typeof name === <span style="color:#df5000;">'undefined'</span><span style="color:#000000;">)</span> <span style="color:#000000;">{</span><br></br>                <br></br>name = <span style="color:#df5000;">""</span>;<br></br>                <br></br><span style="color:#000000;">}</span><br></br>                <br></br><span style="color:#a71d5d;font-weight:bold;">if</span> <span style="color:#000000;">(</span>name === <span style="color:#df5000;">""</span><span style="color:#000000;">)</span> <span style="color:#000000;">{</span><br></br>                <br></br>name = htmlElement<span style="color:#000000;">.</span><span style="color:#795da3;">attr</span><span style="color:#000000;">(</span><span style="color:#df5000;">"data-ref"</span><span style="color:#000000;">)</span>;<br></br>                <br></br><span style="color:#000000;">}</span><br></br>                <br></br><span style="color:#a71d5d;font-weight:bold;">if</span> <span style="color:#000000;">(</span>typeof name === <span style="color:#df5000;">'undefined'</span><span style="color:#000000;">)</span> <span style="color:#000000;">{</span><br></br>                <br></br>name = <span style="color:#df5000;">""</span>;<br></br>                <br></br><span style="color:#000000;">}</span><br></br>                <br></br><span style="color:#a71d5d;font-weight:bold;">if</span> <span style="color:#000000;">(</span>name === <span style="color:#df5000;">""</span><span style="color:#000000;">)</span> <span style="color:#000000;">{</span><br></br>                <br></br>name = htmlElement<span style="color:#000000;">.</span><span style="color:#795da3;">text</span><span style="color:#000000;">()</span>;<br></br>                <br></br><span style="color:#000000;">}</span><br></br>                <br></br><span style="color:#a71d5d;font-weight:bold;">if</span> <span style="color:#000000;">(</span>typeof name === <span style="color:#df5000;">'undefined'</span><span style="color:#000000;">)</span> <span style="color:#000000;">{</span><br></br>                <br></br>name = <span style="color:#df5000;">""</span>;<br></br>                <br></br><span style="color:#000000;">}</span><br></br>                <br></br><span style="color:#795da3;">return</span> name<span style="color:#000000;">.</span><span style="color:#795da3;">trim</span><span style="color:#000000;">()</span>;<br></br>                <br></br>
    ```
    
     </div> </div>
4. Set Value
    
    return ds$(element).val(params);
5. Set Value and Enter
    
    return \_ds.setValue(element, params + '{{ENTER}}');
6. Do a fake MouseOver ( used for some menus)
    
    ds$(element).parent().find('div &gt; ul').show();
    
    // where there is a div, and it has hidden child ul
7. Get Element from a Custom Select ( For application based on complex frameworks)
    
    // This is an example using bootStrap
    
    // array hint should be defined as "array" (without quotation marks)
    
    var selectValues = \[\];
    
    ds$(element).find('a').each(function(idx, theElement){
    
    selectValues.push($(theElement).text().replace(/\\n|\\r/g, "").trim());
    
    });
    
    return selectValues;
8. Set Select Element from a Custom Select ( For application based on complex frameworks)
    
    <div class="codeSnippet"><div class="codeSnippetBody">```
    // This is an example using bootStrap<br></br>                <br></br>// array hint should be defined as "[]" (without quotation marks)<br></br>                <br></br>var found = false;<br></br>                <br></br>// params<br></br>                <br></br>ds$(element).find('a').each(function(idx, theElement){<br></br>                <br></br>var theElementText = ds$(theElement).text().replace(/\n|\r/g, "").trim();<br></br>                <br></br>if (params === theElementText && !found){<br></br>                <br></br>found = true;<br></br>                <br></br>//theElement.click(); // method 1<br></br>                <br></br>//ds$(theElement).click(); // method 2<br></br>                <br></br>// _ds.click(element); // method 3<br></br>                <br></br>}<br></br>                <br></br>});<br></br>                <br></br>return found;<br></br>                <br></br>
    ```
    
     </div> </div>
9. Click to Show the list of elements inside a Custom Select (For applications based on complex frameworks)
    
    return ds$(element).click();
10. Remove any new line character from the returned variable, in this case is "name"
    
    When creating SmartTag libraries, for the case of returning a name for SmartTags, please include this in the return ( if needed, otherwise please skip it):
    
    <div class="codeSnippet"><div class="codeSnippetBody">```
    return name.trim().replace(/(\\r\\n|\\n|\\r)/g,\"\");<br></br>var name = ds$(element).text();<br></br>                <br></br>if (name === ""){<br></br>                <br></br>if (ds$(element).hasAttr('data-component-id')){<br></br>                <br></br>name = ds$(element).attr('data-component-id');<br></br>                <br></br>}<br></br>                <br></br>if (ds$(element).hasAttr('id')){<br></br>                <br></br>name = ds$(element).attr('id');<br></br>                <br></br>}<br></br>                <br></br>}<br></br>                <br></br>if (typeof name !== 'string') {<br></br>                <br></br>name = "";<br></br>                <br></br>}<br></br>                <br></br>return name.trim().replace(/(\r\n|\n|\r)/g,"");<br></br>
    ```
    
     </div> </div>
 
<div id="bkmrk-last-updated%3A-march-">---

Last updated: <span class="mc-variable General.NewDateTimeVariable variable">March 18, 2024</span>

If you have any feedback on this topic, please contact us at <documentation@appvance.ai>

</div>

# Network Workbench Reference

- [Introduction](#Introduc)
- [Navigation](#Navigati)
- [Validations](#Validati)
- [Extractions](#Extracti)
- [Example with zip Extractor](#Example)
 
## <a name="Introduc"></a>Introduction

Network Workbench is similar to the AIQ Validation suite, but it is specific to Test Designer/JS Edit &amp; Play.

Using Network Workbench, the requests can be extracted when it matches the URL which will be in a specific format like JSON, HTML, HTTP, MD5, PDF, etc., from the response to validate it or to create variables for future usage in the scripting.

The request has to be identified as a Regex that matches a fully qualified URL, Fully qualified means the protocol and port should be provided.

Example: Appvance.ai - AI-driven, unified test automation software - The fully-qualified URL is https://www.appvance.com:443

In any case, it is always better to use **.\*** that will match any protocol, domain, and port.

Network Workbench will create variables on the fly with extraction data instead of adding them to the locker.

Network Workbench used full JS Rhino for post-processing while AIQ post-processing is very limited.

## <a name="Navigati"></a>Navigation

To Navigate to Network Workbench, after you log in, Expand the Record option in the left navigation and click Network Workbench.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/J717XXNFdkpriFtt-bb848e1acc50.png)

- You can use the summary tab to search the validations and extractions using the search option.
- Has option to disable or enable definitions, disabling all of them can be used to disable all the validations and extractions, etc.
- Columns can be sorted.
- The summary will provide details and links for the extractors and validations used.
 
## <a name="Validati"></a>Validations

Several validations could be added by providing the Validation Name, choosing what method, and providing the request details.

Responses can be validated for the following formats:

- PDF
- JSON
- HTML
- HTTP
- MD5
- Text
- XML
- String
- CSV
 
Assertion Types:

- Assert Equals
- Not Equals
- Contains
- Does Not Contain
- Less Than
- Greater than
- Less or Equal
- Greater or Equal
- Exists
 
 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/XZoQM37tOQjNqVKO-0845eab5df5a.png)

In the above example, any request matching .\*status.json should have a JSON object called config which should have a status integer with a status code of 100.

Validations can be enabled or disabled using Disable/Enable Toggle.

Multiple validations can be added using Add button, Existing Validations can be updated using the Update button and can be removed using the Remove button.

## <a name="Extracti"></a>Extractions

Extractions will create variables on the fly with extraction data instead of adding them to the locker. The variables are created with a $ at the beginning of the variable name, extraction will find any HTTP Request which matches .\*/learning-area/javascript/oojs/json/superheroes.json

It will process the response as JSON and will get the string "homeTown", it will create a variable $secretBase with results. The $ is added at the beginning of the variable name. The variable could change value during the test if a subsequent call also matches the request URL (in this case .\*/learning-area/javascript/oojs/json/superheroes.json)

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/D29yUgTi9ga5FWMp-baec58093218.png)

## Formats and Examples

### JSON Format

Follows the same format as the AIQ JSON format. For this JSON,

<div class="codeSnippet" id="bkmrk-copy-%7B%22users%22%3A%5B%7B%22use"><div class="codeSnippetBody">```
{<br></br><span style="color:#dd1144;">"users"</span>:[<br></br>{<br></br><span style="color:#dd1144;">"username"</span>:<span style="color:#dd1144;">"John"</span><br></br>},<br></br>{<br></br><span style="color:#dd1144;">"username"</span>:<span style="color:#dd1144;">"Jane"</span><br></br>}<br></br>]<br></br>}<br></br>
```

 </div> </div>To get the first username ("John") the target should be

users\[0\].username

To get the second username ("Jane") the target should be

users\[1\].username

#### PDF Format

The example below will show how to extract the contents of a downloaded PDF page and perform some assertions on the same.

Steps for the scenario:

Navigate to "https://www.w3.org/WAI/standards-guidelines/wcag/20/glance/ "

Click a pdf link that downloads a pdf file ("WCAG 2 at a Glance (PDF) A4")

Assert the word "Perceivable" in the downloaded pdf file.

4![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/JiiRCQVkpSC493gG-15543db8990e.png)

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/EyBb3R1t73e2dAns-6aa09a0a7965.png)

If we inspect the element of the pdf, it will show the request which is what you will need to add to the extractor defining a variable.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/zZEQZyUw2Rerih1J-354dea8f8e49.png)

Go to Network Workbench

Click the Extractions Tab and provide the mentioned values from the screenshot.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/DAa8pvnq8lO4C6yB-19b0171e5f37.png)

Target:

- The document which will extract full text from the PDF
- documentforms which will extract a JSON string with the name and value pairs of existing forms in the PDF document
- page:### where ### indicate the page toindicates the text
- regex:RRR: It will extract the full text, then it will provide the first string that matches the RRR regex. This could be generated with post-processing but is provided as a utility to speed up the process.
 
HTTP:

- Header:Accept will return the value of the request header named "Accept"
- CookieValue:expires will return the value of the request cookie named "expires"
 
TEXT:

Given the request's response is: "This is the ID Id=ABCDEF." then the TEXT extractor can use regular expressions as target values

- Id=.\* will return matching text (evaluating as regular expression): Id=ABCDEF.
 
HTML / XML:

Given the request's response is an XML or HTML then the this extractors can use XPath expressions as target values

- //\*\[local-name()='CountryCode'\]
- //\*\[@id="cart-total"\]
 
#### STRING Format

Given the request's response is: "This is the ID Id=ABCDEF." with 25 characters, then the STRING extractor can use

- 15,24 will return "Id=ABCDEF"
- Id=,false will return "ABCDEF."
- Id=,true will return "Id=ABCDEF."
- Id=,24,true will return "Id=ABCDEF"
- Id=,25,false will return "ABCDEF."
 
Network Workbench files will have a .netx extension.

Now how to use this file in JS / Test Designer?

Below is a Javascript example file that calls the .netx file and performs the other steps of downloading the pdf and then performing the assertions:

<div class="codeSnippet" id="bkmrk-copy-addnetworklibra"><div class="codeSnippetBody">```
addNetworkLibrary("{ds}/PDFTest.netx");<br></br>        <br></br>prepareDomain("https://www.w3.org  ");<br></br>navigateTo("https://www.w3.org/WAI/standards-guidelines/wcag/20/glance/  ");<br></br>click(link("WCAG 2 at a Glance (PDF) A4"));<br></br>        <br></br>log($pdfData);<br></br>        <br></br>assertContains($pdfData,"Perceivable");<br></br>        <br></br>
```

 </div> </div>Note: It is recommended to add **addNetworkLibrary** as the very first step, even before navigating to.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/uhUJWdyORKAw4pOr-82ba9c7e0fc5.png)

## <a name="Example"></a>Example with zip Extractor

API Validation workbench also supports extracting the contents of a zip file and also checking the contents inside certain files and also checking asserting some of the metadata of the file (size of the file for example).

The below example shows how to test this scenario using a Network workbench.

### Zip Content Extractor

Below is an example of a JS Script that navigates to a site to download the zip file and validates the contents of a file inside the zip.

<div class="codeSnippet" id="bkmrk-copy-preparedomain%28%22"><div class="codeSnippetBody">```
prepareDomain(<span style="color:#dd1144;">"https://appvance-qa.s3-us-west-2.amazonaws.com"</span>);<br></br>        <br></br>navigateTo(<span style="color:#dd1144;">"https://appvance-qa.s3-us-west-2.amazonaws.com/qa/folder.zip"</span>);<br></br>        <br></br>wait(<span style="color:#008080;">10000</span>);<br></br>        <br></br>log(<span style="color:#dd1144;">"ZIP Content: "</span>+$ZIPContent);<br></br>        <br></br><span style="color:#333333;font-weight:bold;">var</span> text = $ZIPContent;<br></br>        <br></br>assertTrue(text.startsWith(<span style="color:#dd1144;">"Appvance"</span>));<br></br>        <br></br>assertTrue(text.contains(<span style="color:#dd1144;">"$INSTALL_PATH"</span>));<br></br>
```

 </div> </div>#### JS Script

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/QHAeeNFQA2EyEv9T-0883d17de885.png)

#### Network Workbench Definition

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/SGi98IXFblkokmA4-823670a4048f.png)

#### Output

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/ShQHUR3725L0dXhG-c5d5d8bc1ca7.png)

### Zip MetaData Extractor

Below is an example of a JS Script that navigates to a site to download the zip file and validates the metadata (size) of a file inside the zip.

<div class="codeSnippet" id="bkmrk-copy-addnetworklibra-1"><div class="codeSnippetBody">```
addNetworkLibrary(<span style="color:#dd1144;">"{ds}/ZIPMetaData.netx"</span>);<br></br>        <br></br>prepareDomain(<span style="color:#dd1144;">"https://appvance-qa.s3-us-west-2.amazonaws.com"</span>);<br></br>        <br></br>navigateTo(<span style="color:#dd1144;">"https://appvance-qa.s3-us-west-2.amazonaws.com/qa/folder.zip"</span>);<br></br>        <br></br>wait(<span style="color:#008080;">10000</span>);<br></br>        <br></br>log(<span style="color:#dd1144;">"ZIP META DATA: "</span>+$ZIPMetaData);<br></br>        <br></br><span style="color:#333333;font-weight:bold;">var</span> data = $ZIPMetaData;<br></br>        <br></br><span style="color:#333333;font-weight:bold;">var</span> size = <span style="color:#0086b3;">JSON</span>.parse(data).size;<br></br>        <br></br>assertEquals(<span style="color:#dd1144;">"726 bytes"</span>,size);<br></br>
```

 </div> </div>#### JS Script

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/4wqPTS3YiicmSFwK-edbbb09bd40f.png)

#### Network Workbench Definition

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/ARmerIKawIFznVZ8-a88074509a31.png)

#### Output

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/vwOs6YFCZkEAsYcb-67b924edc037.png)

<div id="bkmrk-last-updated%3A-march-">---

Last updated: <span class="mc-variable General.NewDateTimeVariable variable">March 18, 2024</span>

If you have any feedback on this topic, please contact us at <documentation@appvance.ai>

</div>

# Validation Workbench Overview

- [Introduction](#Introduc)
- [Navigation](#Navigati)
- [Validation Workbench and Options](#Validati)
- [Adding Validations with multiple locators of the same object](#Adding)
- [File Management](#File)
- [Validation Workbench in Test Designer](#Validati2)
- [Driving Validations from a CSV](#Driving)
- [Validation Workbench in AI Blueprinting](#Validati3)
- [FAQ](#FAQ)
 
## <a name="Introduc"></a>**<u>Introduction</u>** 

Usually, validations in the realm of scripting are very limited. The process is normally several actions, then validations, then actions.

That is standard and also a good approach, but as applications grow bigger, these “dot” validations don’t suffice as there could be several other places that behave incorrectly during the script but it was not detected, or just detected by one test case and then overlooked.

These kinds of issues could be detected by a human easily but were hard to address by automated scripts.

To increase the power of issue detection during scripting, Appvance created Validation Workbench which does “extra” validations during Scripting/AISG.

These extra validations consist mainly of 5 elements

- A name of the validation (For reporting)
- If the validation is enabled
- When the validation should be triggered
- The execution (body) of validation
- Type of validation (PASS/FAIL) a PASS validation will succeed if the execution succeeds. A FAIL validation will fail if the execution succeeds
 
So a single script with only 10 lines of codes, and 1000 validations, after every action (click, setValue, type, setSelected, etc.), will check how many of the 1000 validations should be evaluated, and if they should, it will process it automatically.

This enhances the power of the script without affecting its readability/size.

Appvance provides 2 ways of creating validation, through the Validation Workbench &amp; using a CSV file.

Validations Workbench is a Test Designer submodule in which you can create and modify more structured and personalized validations, verifying automatically if validations are successful, failed validation. Validations workbench uses a trigger as a condition to run the validation.

This validation workbench is not related to any SmartTags or it is not related to (independent of ) any Test Designer script, Test Designer step, Scenario Editor, Scenarios, checkpoint tab in Test Designer, etc.

Created validations can be used in Test Designer scripts which can be triggered automatically and also the validation workbench can also be used in AISG.

In simple terms, it works this way:

1. Where to look
2. What to do there
3. What is the pass or fail criteria
 
The Validation Workbench has a .valid extension.

## <a name="Navigati"></a>**<u>Navigation</u>** 

1. Login to AIQ as Admin or a User
2. Expand the Test Designer Section
3. Click Validation Workbench
 
 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/Mby5dZzjTk3nptXN-70b22e046e03.png)

## <a name="Validati"></a>**<u>Validation Workbench and Options</u>** 

### <u>Summary</u> 

The summary tab will give the overall view of the defined validations and Actions in a tabular format with the Name, Trigger Type, Validation Type, Pass type, Match, and Target.

Clicking these names will directly take you to the defined Action or Validation.

You can also sort columns, Search and use reload to refresh the list.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/Cy32XGaw6HwMhvzE-1b73cd9357f6.png)

### <u>Actions</u> 

In the Actions Tab of the validations, you would be able to create javascript functions to get values. You would be able to get values from request, extract text, etc and store it in a variable. Then you can use that variable in the Validations tab.

Example below:

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/k9eTicjZG94fYSts-ede820a0c5ad.png)

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/ukEZuTMVjYeotwR8-d0fbe58ade27.png)

<u>Validations</u>

The validation tab is where the validations are defined and saved. Below you will see all the possible validations that can be defined and triggered.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/U0sEpkcWDx2HJ4Tq-3716dc7fcc55.png)

<u>Validation Name</u>: Provide any meaningful name to define the name of the validation, in Test Designer scripts or AI, the validation names are the reference that would be displayed, even in the logs of the Test Designer script, validation names would be displayed when they are triggered and evaluated.

### Pass When: 

There are 3 options,

1. Condition Succeeded: When this is chosen, we are telling the validation should be succeeded when the condition defined is true
2. Condition Failed: When this is chosen, we are telling the validation should be succeeded when the condition defined is false
3. JavaScript: When this is selected, a text box will be displayed, this will receive a parameter that is defined from a CSV file (DPL). To use this, there should be a CSV file created with some data.
 
 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/TfZlC9vmrSXysaYb-ca960a2bec01.png)

This option is a combination of both Condition Succeeded and Condition Failed. A variable is defined which gets the value from the CSV file from the Test Designer IDE and if it's passed, it will work as Condition Succeeded, else if the condition fails, it works as Condition Failed.

Below is one example of how this works:

Here is a Test Designer script that logs in to AIQ and based on whether the logged-in user is an admin or a user, a validation of license link is triggered.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/8NSxDcABoB8VuifC-90a373cc8a2f.png)

As you notice that the CSV file has entries admin and user, this data is passed to the validation workbench as shown below.

 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/UA6X38y50vvwigNF-f77e69ecda2a.png)

In the example, if you notice Pass when, the text box next to it is defined as - $actualUser==='admin'?'pass':'fail'

When the value passed is admin, the $actualUser will get the value as admin, which means the condition is true, and based on the validation defined if it finds the text 'Admin Options' it will check for the locator 'link("licenseLink")'

Similarly when the value passed is user, the $actualUser will get the value as 'user', which means that the condition is false, and based on the validation defined, it works as Condition failed, and the validation would be triggered when the Text 'Admin Options' is found and the validation triggered would be to check if 'link("licenseLink")' does not appear on the page.

### Enable and Disable option: 

You can enable or disable validations using this toggle, the disabled validations will not be used or triggered in Test Designer or AISG.

### Add and Delete: 

Add button is used to add the validations after filling or choosing values from the drop-down.

The delete button is used to delete the validation chosen.

After making any changes, it is required to save the validation file to take the updates.

### Trigger By

There are 9 possible ways of triggering the validations

1. Static Text Found: When trigger by is chosen to be Text Found, the trigger is activated as soon as it finds the provided Text in the Text Field next to the Trigger by option (As soon as the text is found in the application being tested);
    
     ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/oHAYjZwnh2aALYRL-50800df1336e.png)
2. Image Found: When this option is chosen, the user is presented with the browse option to browse the image file, the trigger is activated when the browsed image is found on the application under test
    
     ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/i0IvVamxhCt2Mo2p-75ed6c99dd5f.png)
3. Element Found: With this option, the trigger would be activated based on the Locator chosen, the locator is something that can be copied from a Test Designer script, once the locator is found in the application under test, this trigger would be activated for the validation
    
     ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/DntTTa40DgOtuRM6-72b5804baf03.png)
4. JS returns true: Choosing this option, a JS call can be written in the console, the trigger will be activated when the JS code returns true
    
     ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/otRemXSW2hjFlG9D-992479886f69.png)
5. Manual Call: With the Manual Call trigger selected, you have to specify the validation manually in Test Designer scripts, Else this validation will not be triggered
    
    
    1. Quick Example Below:
        
        ManualTriggerCheck is the validation name that is used in the below Test Designer example
        
         ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/whuxgzvtpd6Wj48D-d71f898cb93e.png)
6. Always: This trigger would always be activated for all the steps and for all the paths that the AISG takes, and there could be validation failures when the validation is not found and the trigger is always.
    
     ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/hoc239jxyGNSmUGf-337af26fd660.png)
7. JS Text Found
    
    Validation will get triggered if the result of a JS expression is found on the web page / mobile app
8. Every Trigger
    
    This validation will only get triggered if every sub trigger succeeds.
    
    Valid options for sub triggers are Element Found, Static Text Found, JS Text Found, and JS returns true.
    
    You can add and remove sub triggers with the + and - signs respectively
    
     ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/uW5uhjzIYYoOBXI4-620a5055351c.png)
9. Any Trigger
    
    This validation will get triggered if at least one trigger succeeds.
    
    Valid options triggers are Element Found, Text Found and JS returns true.
    
    You can add and remove triggers with the + and - signs respectively.
 
 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/n65bIROqLEjE2Owp-4a63644a66a0.png)

Some options should be chosen with care.

### Validation Type:

There are 5 Validation types described below.

1. Text Present: Text Validation is done when this validation type is chosen, you will have to provide the Expected text value, as this is JS code, the expected value should be written in quotes.
    
    The values can also be driven from the CSV sheet, an example in Driving Validation from CSV will show the usage and syntaxes.
    
     ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/J6R9SoRUiFWqjxUa-5081efd6e906.png)
2. Image Exists: This will validate whether the browsed image is available on the application under test
    
     ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/yk972fWfcVQ27MSA-2212e1751c1e.png)
3. Text Present in Element: Text Present in Element will look for the text in the locator, the locator follows the Test Designer syntax
    
    The Expected value is a text that should be mentioned in double-quotes since the expected value is in JS Code, Expected value can also be driven from a CSV file
    
     ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/5tFBDfBPJPkQNby9-3036ef6963da.png)
4. Element Exists: This is a simple Element that Exists on the page validation, much like an asset that exists in Test Designer, it follows the same syntax as in the Locator field
    
     ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/Hk2SUtU6QOR4dwJN-f08449ee419c.png)
5. JS Code: This option allows you to write a JavaScript code to elaborate a more structured and personalized validation
 
## <a name="Adding"></a><u>Adding Validations with multiple locators of the same object</u> 

There could be instances where a single object on the page would want to be referenced by multiple accessors like an AND condition to meet the criteria, below are some examples to define multiple locators for the same object.

1. byJQuery("span\[class=info\]\[title='Ruby on Rails Bag'\]")
    
    The above approach is by using JQuery, class, and title of the object are used to refer to the same object.
    
     ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/zkcdbGpFNOCY7RXM-2ebead00bfb4.png)
2. span({"className":"info","title":"Ruby on Rails Jr. Spaghetti"})
    
    This method again uses className and title to refer to the same object.
    
     ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/4lf8LFGtor9d5YZl-d588ee87de34.png)
 
## <a name="File"></a>**<u>File Management</u>** 

1. File &gt; New: This option is used to create a new validation file, if you already have a validation file open that is not saved, File &gt; New will ask to save the file and then let the user create a new one.
2. File &gt; Open: This option is used to open an already saved validation file that has at least one valid validation added. Validation file has .valid extension
3. File &gt; Save: This option is used to save the validation file either locally or in the configured repository, if the file is being saved the first time, this behaves like the Save As option.
4. File &gt; Save As: This option can be used to save the already saved file in a different location.
 
When the file is saved, the file name would be displayed in green, if there are changes in the file name would be shown in Orange, and after saving the file, it will change the color to green.

## <a name="Validati2"></a>**<u>Validation Workbench in Test Designer</u>** 

Let's start by creating some of the examples:

An application that is picked for example is our [&gt;https://demosite.appvance.com](https://demosite.appvance.com)

1. Example 1: Checking for the Login button based on the Home link available.
    
     ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/Q2oHgkLX9z5v5VoZ-36424768e1b7.png)
    
    You will have to save the defined validation file.
    
    Go to Test Designer
    
    Right-click and add an empty step.
    
    Choose the Action to be "Add Validation Workbench" - Browse the saved validation file.
    
    From the 2nd step, right-click and do record from here to record your script.
    
    Or if you already have a script, you can add the first line to browse the validation workbench and save the Test Designer script.
    
     ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/GH7OLro7Z40nmEGf-b3cfa7c8dd05.png)
    
    As you can notice in the below screen-shot, the validation would be automatically triggered as soon as the script finds the Locator "link("Home")" and it validates looking for "link("Login")"and the validation would be successful when the element is found else the script would be failed with the message saying the validation was unsuccessful.
    
     ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/hDjG7pJvv3igCO27-88b5896e899a.png)
2. Example 2: Trigger by Text and Validation Type Text
    
     ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/EHP5w58KnC9AeXco-f77a586ef8d3.png)
    
    In this example, the validation would be triggered when the text "Shop by Categories" is found in the application and the validation would be to check if the text "Bags" is available".
    
    Below the Test Designer script, you will also notice that all the applicable validations would be triggered and executed as well, in this case, both example 1 and example 2 validations were triggered in the same step and were executed.
3. ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/axe8jMer3vdqlaUv-f0951fe2b03a.png)
    
    Example 3: Triggering by image and validating the text
    
     ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/9q9zpi2RxvFPs1Nu-211610debb2e.png)
    
    The below example shows how the image is being browsed and the validation is done.
    
    In Test Designer, the full-screen screenshot is taken as well when the trigger is activated and the validation is done.
4. ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/HkvxgH3K6WXwCjnz-17bf86444425.png)
    
    Example 4: Pass When Failed Condition
    
    Below is another example where we could make sure a locator or image or text or a JS is not present in the application, for which this condition could be used to trigger and make sure the image or locator or text is not present in the application under test.
    
     ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/vM0vlPnyiiT97roH-df3c8fa57e63.png)
    
     ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/ZuDQQ7u1t0PVM5t6-40f5b25091eb.png)
5. Example 5: Trigger Always
    
     ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/a1ryqypn9Jljx07d-97fd7e0e4152.png)
    
    This example will show you the trigger by always, which will trigger the validation for all the steps.
    
     ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/mC3xNz1EazlpTWlN-78c5b06891cf.png)
    
    ## <a name="Driving"></a>**<u>Driving Validations from a CSV</u>** 
    
    The below example shows you how the validation data can be passed from a CSV file.
    
    This example is using the JIRA system and triggers the validation of the priority passed based on the mentioned Text.
    
     ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/vqHqep93LjkCwyJr-8f45d1674037.png)
    
    The $Priority that is defined in the validation workbench will use the value from the CSV sheet that is browsed by the Test Designer.
 
## <a name="Validati3"></a><u>Validation Workbench in AISG</u> 

To use validation workbench in AISG and perform automatic validations.

1. Go to Create AISG under AI Scripting
2. Choose Web
3. Choose the Scan Type and Enable **Use Validation Workbench** option
4. Browse the validation file (.valid file)
    
     ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/AvMT4xR0SEIKuAFk-aa202cc37402.png)
5. Rest would be similar steps as to how the AISG is generated
6. Once the AISG is done, go to the Validations tab to check the passed and failed validations with the validation names.
    
    The failed validations will have the option to download the .js and .ds files to check the failures
 
 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/aV9fjflyPChSzRcy-e80f1a266147.png)

## <a name="FAQ"></a>   
<u>FAQ</u> 

1. How different is the Validation Workbench when compared to what we already have in the SmartTag workbench With Validation Workbench you can create more elaborated validations which automatically verify if the validation is successful or if it fails without assigning to a smartTag? Also, you can create validations with js code that will receive parameters and use them to decide if is needed to run the validation or not.
    
    
    1. These validations are true validations of any sort NOT tied to a tag but anything…a state a page an API a UX item. And validate the throughput of the application.
2. When it comes to ds3 scripts, we can add a lot of validations using the Checkpoint tab itself, how is this new wb going to help? With Validations Workbench you can create more validations types, that are more personalized than using Checkpoint tab validations, for example, you can make your own JS validations, call them manually or automatically.
    
    
    1. If you use the same validation workbench in several scripts then a single modification to the validation workbench will update all the related scripts, as opposed to in-script validations that will require modifying all related scripts.
3. I define say 10 validations and that is browsed in Test Designer, Now will that validation be done on every step in Test Designer? if so will it not impact the performance? For each step, it would be run all the validations, which means that whether we have for example five steps and ten validations, it will be run five times the 10 validations that it´s equal to 50 validations ran, and it will consume resources.
    
    
    1. What is tested every time is not the full validation but the trigger condition, but yes that has a performance impact. If you set the trigger to manual for all validations then there is NO impact on performance and you still get the benefit of the centralized definition of commonly used validations.
4. The previous version of validation UI had Pre-Action/Post-Action and there was a note saying if the page refreshes, post-action validation won't work. So now the current case handles it? Whatever new validations are added now, whether it will be performed pre-action or post-action and which step does that corresponds to because we don have any link to the element of the DS script step in it. All validation workbench will work on the same page. SmartTag validations are independent of these workbench validations, so, pre/post actions remain in the product as before.
5. There were many Operations to add in validations such as - equal to/not equal to – quite a list from existing. Are we going to support all this here basically is this going to replace the existing one? How are we going to tag it to SmartTags? Validation Workbench has its operations, which are Boolean validations that are triggered when they find the condition, the other ones are not going to be replaced.
6. In the validation type drop-down when we select an image that exists then on what criteria it will match that image on the application web page? It will match the image on the application web page either by source code written in it or by the term called “footprint” .i.e it recognizes the particular image on the web page.
7. AISG - if we are calling validation in custom JS, it should always be added as the last line of the custom JS for it to work, if it is added in the middle of the steps, it does not trigger the validation. Is this statement correct?
    
    
    1. No. Explicit validate(“name”) will cause that validation “name” To be validated in the place where that line is added. The same with forceValidations.
    2. The automatically triggered validation are the ones that only get triggered in the last step of a custom action.
8. setRealtimeValidations(false) - Setting this upfront in the global setup js, it does not trigger any validations right?
    
    
    1. If we do not want to trigger any validations, why would anyone want to browse the validation file and set this to false
    2. If you do not want real-time validations then can change the validation trigger to manual. Guess usage in setup is only to avoid automatic validations in setup steps.
9. forceValidation() - Should this again be called as the last step of a page, and this will trigger all the validation that applies to that page/page state.
    
    
    1. Is this correct?
    2. Not required. That will be done automatically. The only usage of that is when want to add a check of validations in between the steps of a custom action
10. validate(ValidationName) - Calling this in BP as the last step (custom JS), will this trigger the validation irrespective of the trigger by set in the validation workbench?
    
    
    1. Suppose, for example, the validation was set to trigger by Image, and we call validate(validationName) in the AISG, will this trigger the validation even if it does not find the trigger by (image)?
    2. Will check the trigger condition. If the trigger condition is not met then validation will not be checked
 
<div id="bkmrk-last-updated%3A-august">---

Last updated: <span class="mc-variable General.NewDateTimeVariable variable">August 25, 2023</span>

If you have any feedback on this topic, please contact us at <documentation@appvance.ai>

</div>

# Use Visual Accessors for Web Testing

## What is a Visual Accessor?

Visual Accessors are image based accessors which can be used to enhance your test scripts in situations where traditional code-based accessors will fail. AIQ will capture an image of the website and then crop the surrounding boundaries of the element that you are working on. During playback it takes the image and applies a feature based matching algorithm which creates a pattern from the image and uses that to locate the image on the webpage.

Using a Visual Accessors means that AIQ is not only looking at just the code elements in a page, the AI is also looking at the visual elements on the page.

## Visual Accessors vs Visual Hints

Visual hints are images in test scripts that generally take the place of comments. They are not actual accessors. Only AIQ uses true Visual Accessors.

For example, AIQ can now locate a button and automatically understand the boundaries of the button, its location on the page as well as the visual element of the button to identify it going forward. This means that if in the future, the code-based accessors have changed, or are no longer present, the Visual Accessor used for the button will allow the test to run without failing because of the failure of the other accessors.

## Visual Accessors in AIQ

The ability to use visual accessors has been added to the Web Testing IDE in AIQ 4.10.0. This functionality means that AIQ can now automatically collect images and used them as valid accessors.

These visual accessors allow you to capture images into your test scripts. Images will be linked to the script so that the script is aware of any images.

Previously, accessors for images was limited to the XY coordinates. That means that your scripts run the risk of being somewhat brittle if an image moved a little bit to the left or to the right. Visual accessors make your scripts more resilient and require less maintenance.

Visual accessors are similar to smart tags-based images, the result is a boundary that indicates where the image is located and not a specific HTML tag.

<div class="MCMiniTocBox_0 miniToc nocontent" id="bkmrk-"> </div> Visual accessors for web testing compliments the visual accessors for mobile testing functionality that was introduced in AIQ 4.9. See [Visual Accessors for Mobile Testing for more information. ](/books/mobile-testing/page/visual-accessors-for-mobile-testing)

<div id="bkmrk-last-updated%3A-septem">---

Last updated: <span class="mc-variable General.NewDateTimeVariable variable">September 29, 2023</span>

If you have any feedback on this topic, please contact us at <documentation@appvance.ai>

</div>

# Global JSON File for Scenario Editor Tests

The Global JSON file (global.json) is a configuration file that contains settings that determines how AIQ operates and interacts with applications under test.

The `global.json` file is located in the `..\aiq_distribution\NetworkProxy\config` directory.

Many of these configuration settings are set in the various **Test Options** dialogs in the AIQ user interface. Changing a setting there will update the `global.json` file.

See the following topics on setting test options in AIQ:

- Web Designer - [Test Options - Details](https://docs.appvance.net/Content/AIQ/AIQ5WebDesigner/WebDesigner_TestOptions.htm)
- Web Designer (Classic) - [Test Designer IDE - Top Section](https://docs.appvance.net/Content/AIQ/TestDesigner/Test_Designer_IDE.htm)
- Mobile Designer - [IDE for Mobile Testing](https://docs.appvance.net/Content/AIQ/MobileTesting/IDE/MobileTesting_IDE_Main2.htm)

If you need to make any manual changes, you can edit the file directly in Notepad++ or similar editors. AIQ must be restarted after editing the `global.json` file for any changes to take effect.

Be very careful when making any changes to the `global.json` file. The settings in this file directly affect the behavior of AIQ.

## General Settings 

The `"general"` section contains a variety of configuration settings. Below are some examples of those settings. For ease of reading, the "general" are broken into several subsections in this topic.

<div class="codeSnippet" id="bkmrk-copy-%C2%A0%C2%A0%C2%A0%C2%A0%22general%22%3A-"><div class="codeSnippetBody">```
    "general": {<br></br>        "printURLsInjectedJS": false,<br></br>        "createFilesResponses": false,<br></br>        "enableProxyAtOSLevel": false,<br></br>        "interactive": false,<br></br>        "incognitoMode": true,<br></br>        "visualAccessor": false,<br></br>        "readSocketRetries": 0,<br></br>        "stepTimeOutMiliSeconds": 120000,<br></br>        "printURLs": false,<br></br>        "xpathSearch": false,<br></br>        "overrideProxy": {<br></br>            "server": "127.0.0.1",<br></br>            "portHttps": 9998,<br></br>            "password": "",<br></br>            "excludeDomains": "127.0.0.1,localhost,www.staticDomain.com,*.wildcardDomain.com",<br></br>            "urlPac": "",<br></br>            "portHttp": 9998,<br></br>            "enabled": false,<br></br>            "username": ""<br></br>        },<br></br>        "connectionTimeout": 60000,<br></br>        "minBrowserStartDelay": 1000,<br></br>        "apiEnabled": true,<br></br>        "negotiate": {<br></br>            "password": "PASSWORD",<br></br>            "domain": "",<br></br>            "workstation": "",<br></br>            "enabled": false,<br></br>            "username": "USERNAME"<br></br>        },
```

 </div> </div>- `"printURLsInjectedJS"` - <span style="color:#a52a2a;">???</span>
- `"createFilesResponses"` - <span style="color:#a52a2a;">???</span>
- `"enableProxyAtOSLevel"` - If set to `true`, enable the system level proxy and will not to use the browser level proxy.
- `"interactive"` - <span style="color:#a52a2a;">???</span>
- `"incognitoMode"` - Determines if Incognito Mode is enabled.
- `"visualAccessor"` - Determines if Visual Accesors will be used in test scripts.
- `"readSocketRetries"` - To read the values, retires given for socket connection.
- `"stepTimeOutMiliSeconds"` - The time in milliseconds (ms) in which a step times out. By default this is set to 90000 ms (90 seconds).
- `"printURLs"` - <span style="color:#a52a2a;">???</span>
- `"xpathSearch"` - Determines if XPath Search is enabled.
- `"overrideProxy"` - <span style="color:#a52a2a;">???</span>
- `"connectionTimeout"` - The time in milliseconds (ms) in which a request from AIQ to the application server will time out. By default this is set to 60000 ms (60 seconds).
- `"minBrowserStartDelay"` - The time in milliseconds (ms) before a browser launches. By default this is set to 1000 ms (1 second).
- `"apiEnabled"` - <span style="color:#a52a2a;">???</span>
- `"negotiate"` - <span style="color:#a52a2a;">???</span>
 
<div class="codeSnippet" id="bkmrk-copy-%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%22aiacce"><div class="codeSnippetBody">```
        "aiAccessorPreferences":false,<br></br>        "debug": false,<br></br>        "displayNums": true,<br></br>        "consoleLog": false,<br></br>        "setDownload": [<br></br>            "application/pdf",<br></br>            "image/jpeg",<br></br>            "image/apng",<br></br>            "image/webp",<br></br>            "text/xml",<br></br>            "image/png",<br></br>            "application/xml",<br></br>            "video/mp4"<br></br>        ],
```

 </div> </div>- `"aiAccessorPreferences"` - Determines if the Accessor Preferences AI Engine will be used. See [Accessor Preferences AI Engine for more information on this option.](https://docs.appvance.net/Content/AIQ/WebTesting/VisualAccessorsWeb/VisualAccessors_AIAccesorPrefEngine.htm)
- `"debug"` and `"consoleLog"` - Setting them to `true` will display all the stack-trace and error logs. Setting them to `false` will disable all the logging.
- `"displayNums"` - Determines if line numbers are displayed in Test Designer (Classic).
- `"setDownload"` - Determines the types of files that can be downloaded. You can edit the list to add more entries if there are any additional file types that you need to download from the application under test.
    
    By default it contains the following types:
    
    
    - "application/pdf"
    - "image/jpeg"
    - "image/apng"
    - "image/webp"
    - "text/xml"
    - "image/png"
    - "application/xml"
    - "video/mp4"
 
<div class="codeSnippet" id="bkmrk-copy-%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%22proxy%22"><div class="codeSnippetBody">```
        "proxy": {<br></br>            "httpPort": 9090,<br></br>            "httpsPort": 9091,<br></br>            "enabled": true<br></br>        },<br></br>        "useOSProxy": false,<br></br>        "ntlm": {<br></br>            "password": "yourpassword",<br></br>            "domain": "https://yourdomain.com",<br></br>            "workstation": "https://yourdomain.com",<br></br>            "enabled": false,<br></br>            "username": "yourusername"<br></br>        },<br></br>        "inject": true,<br></br>        "compatibility": false,<br></br>        "autoScrollLogs": true,<br></br>        "setFindOnlyEnabled": true,<br></br>        "forcedShadowDom": false<br></br>    },
```

 </div> </div>- `"proxy"` - The ports that Test Designer uses by default are mentioned here.
- `"useOSProxy"` - Determines if the proxy settings in the OS will be used rather than the `"proxy"` settings.
- `"ntlm"` - If the app under test uses any ntlm authentication, the creds, and other details are to be provided here.
- `"basic auth"` - If the app under test uses any basic authentication, the details should be provided here.
- `"inject"` - Set to true by default, it injects all the Test Designer scripts to take the application under test to record.
- `"compatibility"` - To be set to true when working with IE and to set jquery compatibility.
- `"autoScrollLogs"` - Determines if logs auto scroll. This setting only applies to Web Designer (Classic). Logs autoscroll by default in the Web Designer interface.
- "`SetFindOnlyEnabled`" - Option to find an element only if it is enabled on a page.
- `"forcedShadowDom"` - A global setting. This option can also be set in the Test Options dialogs. See [About Shadow DOM Settings for information on how the two settings interact.](https://docs.appvance.net/Content/AIQ/Knowledge_Base/ForcedShadowDOM.htm)
 
## Accessor Preferences

The `"edit"` section contains the accessor preferences order and priority that you set in the **Test Options** dialog in Web Designer, Test Designer (Classic) and Mobile Designer.

<div class="codeSnippet" id="bkmrk-copy-%C2%A0%C2%A0%C2%A0%C2%A0%22edit%22%3A-%7B%C2%A0%C2%A0"><div class="codeSnippetBody">```
    "edit": {<br></br>        "mobileAccessorList": [<br></br>            "SmartTags",<br></br>            "AccessibilityId",<br></br>            "Id",<br></br>            "Predicate",<br></br>            "ClassChain",<br></br>            "XPathAccessibilityId",<br></br>            "XPathId",<br></br>            "XPath",<br></br>            "XPathText",<br></br>            "XPathIndex",<br></br>            "XPathContains",<br></br>            "XPathClass",<br></br>            "XPathAbsolute",<br></br>            "Image",<br></br>            "image",<br></br>            "text",<br></br>            "Custom",<br></br>            "XY",<br></br>            "Unknown"<br></br>        ],<br></br>        "accessorList": [<br></br>            "SmartTag",<br></br>            "Parent",<br></br>            "AttrTitle",<br></br>            "XPathId",<br></br>            "AttrClass",<br></br>            "XPathName",<br></br>            "Id",<br></br>            "AttrName",<br></br>            "AttrValue",<br></br>            "AttrAlt",<br></br>            "AttrHref",<br></br>            "Src",<br></br>            "Text",<br></br>            "XPath",<br></br>            "XPathClass",<br></br>            "XPathText",<br></br>            "AbsoluteXPath",<br></br>            "RelativeXPath",<br></br>            "TableXPath",<br></br>            "Attribute",<br></br>            "Image",<br></br>            "JQuery",<br></br>            "Index"<br></br>        ]<br></br>    },<br></br>
```

 </div> </div>##  

<span style="color:#a52a2a;font-size:14pt;">Reviewer question - what is the difference between excluded and blocked domains in a practical sense in AIQ?</span>

## Excluded Domains

The `"exclude"` section contains all the domains that will be excluded during test recording playback.

This is a sample from the `global.json` file.

<div class="codeSnippet" id="bkmrk-copy-%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%22ex"><div class="codeSnippetBody">```
            "exclude": {<br></br>                "urls": [],<br></br>                "domains": [<br></br>                    "*googletagmanager.com",<br></br>                    "*labs.iadvize.com",<br></br>                    "firefox.settings.services.mozilla.com",<br></br>                    "firefox-settings-attachments.cdn.mozilla.net",<br></br>                    "location.services.mozilla.com",<br></br>                    "shavar.services.mozilla.com",<br></br>                    "tracking-protection.cdn.mozilla.net",<br></br>                    "content-signature-2.cdn.mozilla.net",<br></br>                ]
```

 </div> </div>###  

The above sample has been edited for length. The default `global.json` file contains more excluded domains.

## Blocked Domains

The `"block"` section contains all the domains that need to be blocked during test recording playback.

This is a sample from the `global.json` file.

<div class="codeSnippet" id="bkmrk-copy-%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%22bl"><div class="codeSnippetBody">```
            "block": {<br></br>                "urls": [<br></br>                    "*/baselogin4.js",<br></br>                    "*/LoginMarketingSurveyResponse.js"<br></br>                ],<br></br>                "domains": [<br></br>                    "*eloqua.com",<br></br>                    "*doubleclick.net",<br></br>                    "*adsafeprotected.com",<br></br>                    "*postrelease.com",<br></br>                    "*script.crazyegg.com",<br></br>                    "*seal.websecurity.norton.com",<br></br>                    "*s7.addthis.com",<br></br>                    "*seal.digicert.com",<br></br>                    "*v1.addthis.com",<br></br>                    "*v1.addthisedge.com",<br></br>                    "*google-analytics.com"<br></br>                ]<br></br>
```

 </div> </div>## Repository Configurations

These sections contains the configuration settings for your chosen repository types. See [Repositories for links to the information on configuring various types of repositories. ](https://docs.appvance.net/Content/AIQ/Global_Options/Preferences/Repository/Repository.htm)

This is a sample of how an Amazon S3 repository configuration appears in the `global.json` file.

<div class="codeSnippet" id="bkmrk-copy-%C2%A0%C2%A0%C2%A0%C2%A0%22aws%22%3A-%7B%C2%A0%C2%A0%C2%A0"><div class="codeSnippetBody">```
    "aws": {<br></br>        "s3": {<br></br>            "secretKey": "SECRETKEY",<br></br>            "secret": "",<br></br>            "enabled": false,<br></br>            "key": "KEY"<br></br>        }<br></br>    },
```

 </div> </div>## Platform 

The `"platforms"` section contains platform and OS related settings and paths including command line options. There are separate sections for Linux, Windows, and Mac OS.

There are options for various browsers and mobile devices. See the [Browser Options ](#Browser) section for examples of browser options.

<div class="codeSnippet" id="bkmrk-copy-%C2%A0%C2%A0%C2%A0%C2%A0%22platforms%22"><div class="codeSnippetBody">```
    "platforms": {<br></br>        "linux": {<br></br>            "browsers": [<br></br>                {<br></br>                    "paths": [<br></br>                        "/usr/bin/google-chrome-stable",<br></br>                        "/usr/bin/google-chrome",<br></br>                        "/usr/bin/chromium-browser"<br></br>                    ],<br></br>                    "name": "ChromeSystemProfile",<br></br>                    "options": [<br></br>                        {<br></br>                            "name": "disable-web-security",<br></br>                            "value": "false"<br></br>                        },<br></br>                        {<br></br>                            "name": "ignore-certificate-errors",<br></br>                            "value": "false"<br></br>                        }<br></br>                    ]<br></br>                },<br></br><br></br><br></br>    [SESCTIONS DELETED]<br></br><br></br>                {<br></br>                    "groupName": "mobile",<br></br>                    "paths": [<br></br>                        "C:/Program Files/Google/Chrome/Application/chrome.exe",<br></br>                        "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe"<br></br>                    ],<br></br>                    "name": "iPad",<br></br>                    "options": [<br></br>                        {<br></br>                            "name": "window-size",<br></br>                            "value": "784,944"<br></br>                        },<br></br>                        {<br></br>                            "name": "window-sizeOriginal",<br></br>                            "value": "768,812"<br></br>                        },<br></br>                        {<br></br>                            "name": "disable-web-security",<br></br>                            "value": "false"<br></br>                        },<br></br>                        {<br></br>                            "name": "experimentalDS3",<br></br>                            "value": "--force-device-scale-factor=1"<br></br>                        }<br></br>                    ],<br></br>                    "userAgent": "iPad"<br></br>                },<br></br>                <br></br><br></br><br></br>    [SESCTIONS DELETED]<br></br><br></br><br></br>    },<br></br>
```

 </div> </div>The above sample has been edited for length. This sample shows the sections for Google Chrome on Linux and an iPad configuration for mobile testing. The default `global.json` file contains many more platform configurations.

### <a name="Browser"></a>Browser Options 

This section shows command line options that have been set for Google Chrome. Note than you can set different options for different instances of a browser. The following sample shows different settings for Google Chrome, Google Chrome System Profile, and Google Chrome Headless browsers.

<div class="codeSnippet" id="bkmrk-copy-%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%22window"><div class="codeSnippetBody">```
        "windows": {<br></br>            "browsers": [<br></br><br></br>                {<br></br>                    "paths": [<br></br>                        "C:/Program Files/Google/Chrome/Application/chrome.exe",<br></br>                        "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe"<br></br>                    ],<br></br>                    "name": "Chrome",<br></br>                    "options": [<br></br>                        {<br></br>                            "name": "disable-web-security",<br></br>                            "value": "false"<br></br>                        },<br></br>                        {<br></br>                            "name": "ignore-certificate-errors",<br></br>                            "value": "false"<br></br>                        },<br></br>                        {<br></br>                            "name": "disable-extensions",<br></br>                            "value": "true"<br></br>                        }<br></br>                    ]<br></br>                },<br></br>                {<br></br>                    "paths": [<br></br>                        "C:/Program Files/Google/Chrome/Application/chrome.exe",<br></br>                        "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe"<br></br>                    ],<br></br>                    "name": "ChromeSystemProfile",<br></br>                    "options": [<br></br>                        {<br></br>                            "name": "disable-web-security",<br></br>                            "value": "false"<br></br>                        },<br></br>                        {<br></br>                            "name": "ignore-certificate-errors",<br></br>                            "value": "false"<br></br>                        }<br></br>                    ]<br></br>                },<br></br>                {<br></br>                    "paths": [<br></br>                        "C:/Program Files/Google/Chrome/Application/chrome.exe",<br></br>                        "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe"<br></br>                    ],<br></br>                    "name": "ChromeHeadless",<br></br>                    "options": [<br></br>                        {<br></br>                            "name": "no-sandbox",<br></br>                            "value": "true"<br></br>                        },<br></br>                        {<br></br>                            "name": "ignore-certificate-errors",<br></br>                            "value": "true"<br></br>                        },<br></br>                        {<br></br>                            "name": "disable-extensions",<br></br>                            "value": "false"<br></br>                        },<br></br>                        {<br></br>                            "name": "disable-web-security",<br></br>                            "value": "false"<br></br>                        },<br></br>                        {<br></br>                            "name": "disable-gpu",<br></br>                            "value": "true"<br></br>                        },<br></br>                        {<br></br>                            "name": "experimentalDS3",<br></br>                            "value": "--disk-cache-size=1||--window-size=1920,1080||--force-device-scale-factor=1.0"<br></br>                        }<br></br>                    ]<br></br>                },
```

 </div> </div>For example, Google Chrome command line options include:

- --new-window
- --start-maximized
- --disable-popup-blocking
- --no-first-run
- --disable-translate
- --disable-extensions
- --proxy-server=&lt;scheme&gt;=&lt;uri&gt;\[:&lt;port&gt;\]\[;...\] | &lt;uri&gt;\[:&lt;port&gt;\] | "direct://"
- --no-sandbox
- --ignore-certificate-errors-spki-list
 
Refer to the browser specific documentation for information on command line settings.

<div id="bkmrk-last-updated%3A-march-">---

Last updated: <span class="mc-variable General.NewDateTimeVariable variable">March 18, 2024</span>

If you have any feedback on this topic, please contact us at <documentation@appvance.ai>

</div>

# Compare PDF Files in AIQ Web Tests

There are actions in the Test Designer that allows you to compare two PDF files. The report will detail all the changes, based on the rules that you specify, on a page by page basis between the two files.

For example, you can validate that all the elements on every page from the template PDF file appear on the same page in the dynamic PDF file with the same formatting.

These two PDF files in the comparison are:

- Template PDF file that contains the baseline information and formatting
- Dynamic PDF file that has been downloaded as part of a Test Designer script
 
You can compare certain elements in the two PDF files based on rules that you create. See [Rules Based Comparison](#Rules) for more information.

You can compare the complete contents of the two PDF files to each other. See [Comparing PDFs](#Comparin) for more information.

This feature requires to open the port 9013 in the controller to be accessed from test nodes and end-user computers. See [AIQ Required Ports for information on required ports.](https://docs.appvance.net/Content/AIQ/Getting_Started/AIQ_Required_Ports.htm)

## <a name="Rules"></a>Rules Based Comparison

You can create the rules by which the PDFs will be compared. Since you specify the rules during the comparison, you can create custom rules that can be used in very specific situations or rules that will be used for all of your comparisons.

Prerequisite: You must be familiar with writing regular expressions (regex) in order to author custom rules.

Considerations:

- Rules can be applied by page basis or globally for all pages.
 
- You can check for the umber of pages which means that you can verify that both PDF files contain same number of pages.
- You can choose whether or not to ignore blank pages,
- You can choose to report on blank pages. For example, if a blank page is found in a PDF file you can log a warning which will be highlighted in the report.
- You can verify the position of certain elements to see if they have the same XY coordinates in each document.
- You can verify font and font size of elements.
 
## Sample rules.txt File

This is an example of a rules file used for comparing two PDF files. This comparison checks for the existence of specified content as well as how it is formatted (font / bold / size).

<div class="codeSnippet" id="bkmrk-copy-%7B%C2%A0%C2%A0%C2%A0%C2%A0%22rules%22%3A-%7B"><div class="codeSnippetBody">```
{<br></br>    "rules": {<br></br>        "policy": {<br></br>            "format": "^([A-Z]{2}[0-9]{8})",<br></br>            "fontFamily": "Arial",<br></br>            "Bold": "no",<br></br>            "Size": 12<br></br>        },"number": {<br></br>            "format": "^([0-9]{4}[A-Z]{3})$",<br></br>            "fontFamily": "Arial",<br></br>            "Bold": "no",<br></br>            "Size": 12<br></br>        },<br></br>        "plate": {<br></br>            "format": "(\\s[0-9]{7})",<br></br>            "fontFamily": "Tahoma",<br></br>            "Bold": "yes",<br></br>            "Size": 12<br></br>        },<br></br>        "created": {<br></br>            "format": "^([0-9]{2}\\s(de)\\s[a-zA-Z]{3,15}\\s(de)\\s[0-9]{4})",<br></br>            "fontFamily": "Helvetica",<br></br>            "Bold": "no",<br></br>            "Size": 11<br></br>        },<br></br>        "name": {<br></br>            "format": "^([a-zA-Z]{3,5}\\s[a-zA-Z]{3,5})$",<br></br>            "fontFamily": "Tahoma",<br></br>            "Bold": "no",<br></br>            "Size": 10<br></br>        }        <br></br>    }<br></br>}
```

 </div> </div>###  Syntax of the Rules

Rules are created using regular expressions (regex). For example, the `format` attribute in the `policy` section of above sample code, checks for a policy number within the PDF with the following parameters:

- `^` indicates that policy element should begin with what follows
- `[A-Z]{2}` indicates two uppercase characters
- `[0-9]{8}` indicates eight numerical characters
 
The `fontFamily`, `bold`, and `size` attributes specify how the policy number is expected to appear in the PDF file.

If the comparison identifies a string that matches the format but does not match these expected display attributes that difference will be noted in the report.

### Checking the Rules

You can compare the two PDF files just on the basis of the rules that you have created. Here is a sample of a script for that function.

### Sample checkRules.js File

<div class="codeSnippet" id="bkmrk-copy-var-%24basefilena"><div class="codeSnippetBody">```
var $basefilename = <span style="color:#df5000;">"{mds}/OriginalFile.pdf"</span>;<br></br>var $comparisonfilename = <span style="color:#df5000;">"{mds}/NewFile.pdf"</span>;<br></br>var $rulesfilename = <span style="color:#df5000;">"{mds}/rules.txt"</span>;<br></br><br></br><br></br>var response = <span style="color:#795da3;">assertPDFRules</span><span style="color:#000000;">(</span>$basefilename<span style="color:#000000;">,</span>$comparisonfilename<span style="color:#000000;">,</span>$rulesfilename<span style="color:#000000;">)</span>;<br></br>var responseObj = JSON<span style="color:#000000;">.</span><span style="color:#795da3;">parse</span><span style="color:#000000;">(</span>response<span style="color:#000000;">)</span>;<br></br>var summaryRuleDiffs = responseObj<span style="color:#000000;">.</span>content<span style="color:#000000;">.</span>summaryRuleDiffs;<br></br><span style="color:#a71d5d;font-weight:bold;">for</span><span style="color:#000000;">(</span>var idx = <span style="color:#008080;">0</span>; idx <span style="color:#000000;"><</span> summaryRuleDiffs<span style="color:#000000;">.</span>length; idx<span style="color:#000000;">++)</span> <span style="color:#000000;">{</span><br></br>    var matches = summaryRuleDiffs<span style="color:#000000;">[</span>idx<span style="color:#000000;">].</span>matches;<br></br>  <span style="color:#795da3;">log</span><span style="color:#000000;">(</span><span style="color:#df5000;">"-------------------------------------------------------------------------------------------------------"</span><span style="color:#000000;">)</span>;<br></br>  <span style="color:#795da3;">log</span><span style="color:#000000;">(</span><span style="color:#df5000;">"Page: "</span> <span style="color:#000000;">+</span> summaryRuleDiffs<span style="color:#000000;">[</span>idx<span style="color:#000000;">].</span>pageId<span style="color:#000000;">)</span>; <br></br>  <span style="color:#a71d5d;font-weight:bold;">for</span><span style="color:#000000;">(</span>var matchId = <span style="color:#008080;">0</span>; matchId <span style="color:#000000;"><</span> matches<span style="color:#000000;">.</span>length; matchId<span style="color:#000000;">++)</span> <span style="color:#000000;">{</span><br></br>      <span style="color:#795da3;">log</span><span style="color:#000000;">(</span><span style="color:#df5000;">"     Rule Name: "</span> <span style="color:#000000;">+</span> matches<span style="color:#000000;">[</span>matchId<span style="color:#000000;">].</span>name<span style="color:#000000;">)</span>; <br></br>    var rules = matches<span style="color:#000000;">[</span>matchId<span style="color:#000000;">].</span>rules;<br></br>    <span style="color:#a71d5d;font-weight:bold;">for</span><span style="color:#000000;">(</span>var ruleId = <span style="color:#008080;">0</span>; ruleId <span style="color:#000000;"><</span> rules<span style="color:#000000;">.</span>length; ruleId<span style="color:#000000;">++)</span> <span style="color:#000000;">{</span><br></br>      <span style="color:#795da3;">log</span><span style="color:#000000;">(</span><span style="color:#df5000;">"          Found: "</span> <span style="color:#000000;">+</span> rules<span style="color:#000000;">[</span>ruleId<span style="color:#000000;">].</span>found<span style="color:#000000;">)</span>; <br></br>      <span style="color:#795da3;">log</span><span style="color:#000000;">(</span><span style="color:#df5000;">"          Match: "</span> <span style="color:#000000;">+</span>  rules<span style="color:#000000;">[</span>ruleId<span style="color:#000000;">].</span>match<span style="color:#000000;">)</span>; <br></br>      <span style="color:#795da3;">log</span><span style="color:#000000;">(</span><span style="color:#df5000;">"          Font Expected: "</span> <span style="color:#000000;">+</span> rules<span style="color:#000000;">[</span>ruleId<span style="color:#000000;">].</span>fontExpected<span style="color:#000000;">)</span>; <br></br>      <span style="color:#795da3;">log</span><span style="color:#000000;">(</span><span style="color:#df5000;">"          Font Found: "</span> <span style="color:#000000;">+</span>  rules<span style="color:#000000;">[</span>ruleId<span style="color:#000000;">].</span>foundFont<span style="color:#000000;">)</span>; <br></br>      <span style="color:#795da3;">log</span><span style="color:#000000;">(</span><span style="color:#df5000;">"\r\n"</span><span style="color:#000000;">)</span>;<br></br>    <span style="color:#000000;">}</span><br></br>    <br></br>  <span style="color:#000000;">}</span>  <br></br><span style="color:#000000;">}</span>
```

 </div> </div>- `$basefilename` is the name and location of the base PDF file for the comparison. In the sample code this file is `OriginalFile.pdf`.
- `$comparisonfilename` is the name and location of the comparison PDF file. In the sample code this file is `NewFile.pdf`.
- `$rulesfilename` is the name and location of the rules file. In the sample code, this file is `rules.txt`.
- `assertPDFRules` is the action that invokes the comparison function
 
### Performing the Rules Check

From Services Workbench, load the `checkRules.js` file, and click **Play Script**. After the script has been run, the response tab is populated with the details of what rules were chcked and what was found, with any differences noted.

#### **Sample Output on the Response Tab** 

```
   Rule Name: policy
```

```
      Found: AB12345678
```

```
      Match: AB12345678
```

```
      Font Expected: Arial
```

```
      Font Found: Helvetica
```

This is just the output for the `policy` element of the rules file.

## <a name="Comparin"></a>Comparing PDFs

You can also compare the complete content of two PDF files. Here is a sample of a script for that function.

### Sample compareJson.js File

<div class="codeSnippet" id="bkmrk-copy-var-%24basefilena-1"><div class="codeSnippetBody">```
var $basefilename = <span style="color:#df5000;">"{mds}/OriginalFile.pdf"</span>;<br></br>var $comparisonfilename = <span style="color:#df5000;">"{mds}/NewFile.pdf"</span>;<br></br><br></br>var response = <span style="color:#795da3;">comparePDF</span><span style="color:#000000;">(</span>$basefilename<span style="color:#000000;">,</span>$comparisonfilename<span style="color:#000000;">)</span>;<br></br><br></br>var objResponse = JSON<span style="color:#000000;">.</span><span style="color:#795da3;">parse</span><span style="color:#000000;">(</span>response<span style="color:#000000;">)</span>;<br></br><br></br>var response = objResponse<span style="color:#000000;">.</span>content;<br></br><span style="color:#795da3;">log</span><span style="color:#000000;">(</span><span style="color:#df5000;">"-------------------------------------------------------------------------------------------------------"</span><span style="color:#000000;">)</span>;<br></br><span style="color:#795da3;">log</span><span style="color:#000000;">(</span><span style="color:#df5000;">"Base Pdf: "</span> <span style="color:#000000;">+</span> response<span style="color:#000000;">.</span>template <span style="color:#000000;">+</span> <span style="color:#df5000;">"                    Pages Count: "</span> <span style="color:#000000;">+</span> response<span style="color:#000000;">.</span>templatePageCount<span style="color:#000000;">)</span>;<br></br><span style="color:#795da3;">log</span><span style="color:#000000;">(</span><span style="color:#df5000;">"Comparison Pdf: "</span> <span style="color:#000000;">+</span> response<span style="color:#000000;">.</span>pdf <span style="color:#000000;">+</span> <span style="color:#df5000;">"                Pages Count: "</span> <span style="color:#000000;">+</span> response<span style="color:#000000;">.</span>pageCount<span style="color:#000000;">)</span>;<br></br><span style="color:#795da3;">log</span><span style="color:#000000;">(</span><span style="color:#df5000;">"-------------------------------------------------------------------------------------------------------"</span><span style="color:#000000;">)</span>;<br></br><span style="color:#795da3;">log</span><span style="color:#000000;">(</span><span style="color:#df5000;">"Differences per page:"</span><span style="color:#000000;">)</span>;<br></br>var pages = response<span style="color:#000000;">.</span>pages;<br></br><span style="color:#a71d5d;font-weight:bold;">for</span><span style="color:#000000;">(</span>var idx = <span style="color:#008080;">0</span>; idx <span style="color:#000000;"><</span> pages<span style="color:#000000;">.</span>length; idx<span style="color:#000000;">++)</span> <span style="color:#000000;">{</span><br></br>      <span style="color:#795da3;">log</span><span style="color:#000000;">(</span><span style="color:#df5000;">"        Page: "</span> <span style="color:#000000;">+</span>  pages<span style="color:#000000;">[</span>idx<span style="color:#000000;">].</span>pageId <span style="color:#000000;">+</span> <span style="color:#df5000;">": "</span> <span style="color:#000000;">+</span> pages<span style="color:#000000;">[</span>idx<span style="color:#000000;">].</span>differences <span style="color:#000000;">+</span> <span style="color:#df5000;">" differences."</span><span style="color:#000000;">)</span>;   <br></br><span style="color:#000000;">}</span><br></br><span style="color:#795da3;">log</span><span style="color:#000000;">(</span><span style="color:#df5000;">"-------------------------------------------------------------------------------------------------------"</span><span style="color:#000000;">)</span>;<br></br>var differences = response<span style="color:#000000;">.</span>dynamicPdf;<br></br> <span style="color:#795da3;">log</span><span style="color:#000000;">(</span><span style="color:#df5000;">"PDF: "</span> <span style="color:#000000;">+</span> response<span style="color:#000000;">.</span>pdf <span style="color:#000000;">+</span>  <span style="color:#df5000;">"\r\n "</span> <span style="color:#000000;">)</span>;<br></br><span style="color:#a71d5d;font-weight:bold;">for</span><span style="color:#000000;">(</span>var idx = <span style="color:#008080;">0</span>; idx <span style="color:#000000;"><</span> differences<span style="color:#000000;">.</span>length; idx<span style="color:#000000;">++)</span> <span style="color:#000000;">{</span>   <br></br>    <span style="color:#795da3;">log</span><span style="color:#000000;">(</span><span style="color:#df5000;">"        PageId: "</span> <span style="color:#000000;">+</span> differences<span style="color:#000000;">[</span>idx<span style="color:#000000;">].</span>pageId  <span style="color:#000000;">+</span> <span style="color:#df5000;">", Font: "</span> <span style="color:#000000;">+</span> differences<span style="color:#000000;">[</span>idx<span style="color:#000000;">].</span>details<span style="color:#000000;">.</span>font <span style="color:#000000;">)</span>;<br></br>    <span style="color:#795da3;">log</span><span style="color:#000000;">(</span><span style="color:#df5000;">"                Found: "</span> <span style="color:#000000;">+</span> differences<span style="color:#000000;">[</span>idx<span style="color:#000000;">].</span>details<span style="color:#000000;">.</span>pdf <span style="color:#000000;">+</span> <span style="color:#df5000;">"\r\n"</span><span style="color:#000000;">)</span>;<br></br>    <span style="color:#795da3;">log</span><span style="color:#000000;">(</span><span style="color:#df5000;">"-------------------------------------------------------------------------------------------------------"</span><span style="color:#000000;">)</span>;<br></br><span style="color:#000000;">}</span>
```

 </div> </div>- `$basefilename` is the name and location of the base PDF file for the comparison. In the sample code this file is `OriginalFile.pdf`.
- `$comparisonfilename` is the name and location of the comparison PDF file. In the sample code this file is `NewFile.pdf`.
- `$rulesfilename` is the name and location of the rules file. In the sample code, this file is `rules.txt`.
- `comparePDF` is the action that invokes the comparison function
 
### Performing the Comparison

From Services Workbench, load the `compareJason.js` file, click **Play Script**. After the script has been run, the response tab is populated with the details of what rules were chcked and what was found, with any differences noted.

#### **Sample Output on the Response Tab** 

```
----------------------------------------------------
```

```
Base PDF: OriginalFile.pdf    Page Count: 3
```

```
Comparison PDF: NewFile.PDF   Page Count: 3
```

```
----------------------------------------------------
```

```
Differences per page:
```

```
   Page: 3: 1 differences
```

```
----------------------------------------------------
```

```
PDF: NewFile.PDF 
```

```
 
```

```
    PageId: 3, Font: Helvetica
```

```
            Found: $99.99
```

```
 
```

 Explanation:

- Header contains a summary of the comparison, which includes the file names and the number of pages.
- Differences per page are noted. In this case only one difference was found and it was found on page 3.
- Report shows the change in the comparison file. In this case it was the text "$99.99" in Helvetica.
 
```
 
```

### HTML Comparison Report

The comparison report lists the details of all differences to both text within the two PDF files.

Details include:

- Text attributes: Font size, formatting
- Location information: X/Y coordinates, height/width, page number
- Image information: Report will show both images
 
 ![](https://docs.appvance.net/uploads/images/gallery/2026-07/scaled-1680-/v9l5RjkEIzGMIWnW-0ca65fdb4fe7.png)

<div id="bkmrk-last-updated%3A-octobe">---

Last updated: <span class="mc-variable General.NewDateTimeVariable variable">October 14, 2023</span>

If you have any feedback on this topic, please contact us at <documentation@appvance.ai>

</div>

# WebDesigner: Configuring a node to run containerized Chrome

Dockerfile Dockerfile.linux-linux Dockerfile.macos-linux Dockerfile.windows Dockerfile.windows-linux Dockerfile.windows-windows

**Status:** Development / validation. Do not enable for production until the acceptance checklist in the implementation progress log (`<span class="editor-theme-code">documentation/BrowserManager/design/containerized-browser-pool-implementation-progress.md</span>`) is complete.

## Overview

DSServer can run Chrome sessions inside disposable Docker containers instead of a local browser profile. Each session leases a container from a pool; when the session ends the container's Chrome process and lease directory are cleaned up and the container is reused. Local browser profiles keep working through the existing manager path — containerized Chrome is an additional profile (`<span class="editor-theme-code">ChromeContainerized</span>`), not a replacement.

Source lives in `<span class="editor-theme-code">DSServer/container-browser/</span>` (Dockerfiles, shared `<span class="editor-theme-code">browser-supervisor.py</span>`, baked `<span class="editor-theme-code">extensions/</span>`, host guides under `<span class="editor-theme-code">guides/</span>`, and `<span class="editor-theme-code">global.json</span>` examples under `<span class="editor-theme-code">config/</span>`). Installed AIQ packages use the **release-matched container-browser bundle** shipped with that release (see [Installed AIQ package vs. source checkout](https://appvance.atlassian.net/wiki/spaces/EN/pages/5542674435/WebDesigner+Configuring+a+node+to+run+containerized+Chrome#Installed-AIQ-package-vs.-source-checkout "#Installed-AIQ-package-vs.-source-checkout")).

### Key concepts

- **The container OS selects the image, not the host OS.** A Mac or a Windows 11 machine in Linux-container mode runs the Linux image. There is no native macOS container mode.
- **Two images:** Linux (`<span class="editor-theme-code">appvance/ds-chrome:local</span>`, Debian bookworm + Google Chrome stable, **linux/amd64**) and Windows (`<span class="editor-theme-code">appvance/ds-chrome-windows:local</span>`, Windows Server 2025 LTSC + Chrome for Testing + embeddable Python). Tags are distinct, so building one never overwrites the other.
- **Headless only.** Neither image starts a visible desktop browser window.
- **A new manager per session;** only the container pool registry is shared.
- **No persistent state.** No bind mounts, no persistent profiles. Linux uses tmpfs on a read-only root filesystem; Windows uses the container's disposable writable layer. Idle containers run no Chrome process.
- **DSServer and Docker on the same host.** Every recipe assumes this. A remote Docker daemon, rootless Docker, or a custom network needs a separate address and CDP routing review.
- **Docker access is root/admin-equivalent.** The account DSServer runs as must be able to use the Docker CLI against the configured context; restrict that access to trusted operators.

## Validation status

<table id="bkmrk-scenariostatuswindow" style="margin:24px 0px 0px;border-collapse:collapse;width:760px;border:1px solid rgb(221,222,225);table-layout:fixed;font-size:1em;height:1px;"><colgroup><col></col><col></col></colgroup><tbody><tr style="height:46.4219px;"><th class="align-left" style="background-color:rgb(240,241,242);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:0px;text-align:left;vertical-align:top;min-width:48px;font-weight:400;">Scenario

</th><th class="align-left" style="background-color:rgb(240,241,242);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:0px;text-align:left;vertical-align:top;min-width:48px;font-weight:400;">Status

</th></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Windows 11 / Docker Desktop, Linux containers

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">VALIDATED Live DSServer MCP sessions (navigation, click, page queries, proxy injection, shutdown, container reuse); 2–10 container stress test, 11th-session rejection, 4 replacements

</td></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Windows 11 / Docker Desktop, Windows containers

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">VALIDATED Live Apple flow, 10-container stress, 4 same-container Chrome PID replacements, 20-second exhaustion retry

</td></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">macOS Apple Silicon / Docker Desktop, Linux containers (amd64 emulation)

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">VALIDATED <span style="color:rgb(41,42,46);background-color:rgba(5,21,36,0.06);">Sep 29, 2026</span>, Chrome 154.0.8037.57: image load/inspect, standalone supervisor checks, pool startup, proxy probe, MCP discovery, navigation, stop and reuse; 10 concurrent sessions on 10 sites; replacement batches at 10–12 concurrency; 30 starts/navigations and 32 stops. **Not** a completed 100-session soak.

</td></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Windows Server 2025, Windows containers

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">RECIPE ONLY Not yet build/live tested

</td></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Native Linux, Docker Engine

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">RECIPE ONLY Not yet build/live tested

</td></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Broader action parity / production rollout

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">PENDING

</td></tr></tbody></table>

The macOS concurrency run exposed a race between explicit stop and the browser watcher: both removed the same JVM shutdown hook, throwing a `<span class="editor-theme-code">NullPointerException</span>` and leaving stale session inventory. The lifecycle code now claims and clears the hook atomically; the post-fix run was clean.

Evidence: `<span class="editor-theme-code">documentation/BrowserManager/evidence/containerized-chrome-apple-2026-09-23/</span>` and `<span class="editor-theme-code">containerized-chrome-windows-2026-09-24/</span>`.

## Step 1 — Pick the recipe for your node

<table id="bkmrk-dsserver-hostdocker-" style="margin:24px 0px 0px;border-collapse:collapse;width:760px;border:1px solid rgb(221,222,225);table-layout:fixed;font-size:1em;height:1px;"><colgroup><col></col><col></col><col></col><col></col><col></col><col></col></colgroup><tbody><tr style="height:73.8438px;"><th class="align-left" style="background-color:rgb(240,241,242);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:0px;text-align:left;vertical-align:top;min-width:48px;font-weight:400;">DSServer host

</th><th class="align-left" style="background-color:rgb(240,241,242);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:0px;text-align:left;vertical-align:top;min-width:48px;font-weight:400;">Docker engine mode

</th><th class="align-left" style="background-color:rgb(240,241,242);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:0px;text-align:left;vertical-align:top;min-width:48px;font-weight:400;">Dockerfile

</th><th class="align-left" style="background-color:rgb(240,241,242);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:0px;text-align:left;vertical-align:top;min-width:48px;font-weight:400;">`<span class="editor-theme-code">global.json</span>` example

</th><th class="align-left" style="background-color:rgb(240,241,242);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:0px;text-align:left;vertical-align:top;min-width:48px;font-weight:400;">Docker host key

</th><th class="align-left" style="background-color:rgb(240,241,242);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:0px;text-align:left;vertical-align:top;min-width:48px;font-weight:400;">Guide

</th></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Windows 11

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Linux containers

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">Dockerfile.windows-linux</span>`

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">config/windows11-dual.json</span>`

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">dockerHosts.desktop</span>`

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">guides/windows-11.md</span>`

</td></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Windows 11

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Windows containers

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">Dockerfile.windows-windows</span>`

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">config/windows11-dual.json</span>`

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">dockerHosts.desktop</span>`

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">guides/windows-11.md</span>`

</td></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Windows Server 2025

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Windows containers

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">Dockerfile.windows-windows</span>`

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">config/windows-server-2025-windows.json</span>`

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">dockerHosts.server</span>`

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">guides/windows-server-2025.md</span>`

</td></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">macOS

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Linux containers

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">Dockerfile.macos-linux</span>`

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">config/macos-linux.json</span>`

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">dockerHosts.desktop</span>`

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">guides/macos.md</span>`

</td></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Linux

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Linux containers

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">Dockerfile.linux-linux</span>`

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">config/linux-linux.json</span>`

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">dockerHosts.engine</span>`

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">guides/linux.md</span>`

</td></tr></tbody></table>

The named Dockerfiles make each host/engine combination explicit. `<span class="editor-theme-code">Dockerfile</span>` (Linux) and `<span class="editor-theme-code">Dockerfile.windows</span>` remain canonical; the three Linux recipes produce the same `<span class="editor-theme-code">appvance/ds-chrome:local</span>` image, and `<span class="editor-theme-code">Dockerfile.windows-windows</span>` mirrors `<span class="editor-theme-code">Dockerfile.windows</span>`. If you change a canonical file, keep the named copies aligned.

### Installed AIQ package vs. source checkout

- **Source checkout (development):** build from the repository root with `<span class="editor-theme-code">DSServer/container-browser</span>` as the build context, and edit `<span class="editor-theme-code">DSServer/config/global.json</span>`.
- **Installed, released AIQ package:** do **not** rebuild DSServer, replace its JAR, run Maven, or mix container-browser files from another AIQ version. Use the container-browser bundle shipped with the installed release (Dockerfiles, `<span class="editor-theme-code">browser-supervisor.py</span>`, `<span class="editor-theme-code">config/*.json</span>`, and helper scripts such as `<span class="editor-theme-code">verify-macos.sh</span>`). Edit `<span class="editor-theme-code"><AIQ-install>/config/global.json</span>` and restart with the package's normal launcher. If the bundle wasn't included, get it from the same release's artifacts, not an arbitrary checkout.

## Step 2 — Common configuration (global.json)

Each example file in `<span class="editor-theme-code">config/</span>` contains a complete **root-level** `<span class="editor-theme-code">containerBrowsers</span>` **object**. Copy **only that object** into `<span class="editor-theme-code">global.json</span>`, replacing any previous `<span class="editor-theme-code">containerBrowsers</span>` object and keeping every other property. If the installed configuration already has the object, update it in place.

Required edits before starting DSServer:

1. `<span class="editor-theme-code">ownerId</span>` — stable across restarts and unique to one DSServer deployment. On startup DSServer removes labeled containers belonging to this owner and pool before accepting leases; two running servers sharing an `<span class="editor-theme-code">ownerId</span>` would delete each other's containers.
2. `<span class="editor-theme-code">dockerHosts.<name>.context</span>` — set to the output of `<span class="editor-theme-code">docker context show</span>` (check `<span class="editor-theme-code">docker context ls</span>` too). The adapter uses the configured context explicitly for every Docker call and does not inherit the shell's current context. Common values: `<span class="editor-theme-code">default</span>`, `<span class="editor-theme-code">desktop-linux</span>` (Docker Desktop on Mac).
3. `<span class="editor-theme-code">network.dsProxyHost</span>` — the address containers use to reach DSServer's HTTP proxy (port typically **9090**):
    - Docker Desktop (Windows 11, macOS): `<span class="editor-theme-code">host.docker.internal</span>`
    - Linux Docker Engine: the `<span class="editor-theme-code">bridge</span>` network gateway (replaces `<span class="editor-theme-code">REPLACE-WITH-DOCKER-BRIDGE-GATEWAY-IPV4</span>`)
    - Windows Server 2025: the `<span class="editor-theme-code">nat</span>` network gateway (replaces `<span class="editor-theme-code">REPLACE-WITH-HOST-NAT-IPV4</span>`). Native Docker on Windows Server has no `<span class="editor-theme-code">host.docker.internal</span>`.
4. **Pool size (**`<span class="editor-theme-code">minSize</span>` **/** `<span class="editor-theme-code">maxSize</span>`**)** — examples start 2 warm containers and allow up to 20 (Linux) or 10 (Windows). The maximum is a ceiling, not a recommendation; size it for host memory and CPU.

### Configuration reference

<table id="bkmrk-settingnotesenabledf" style="margin:24px 0px 0px;border-collapse:collapse;width:760px;border:1px solid rgb(221,222,225);table-layout:fixed;font-size:1em;height:1px;"><colgroup><col></col><col></col></colgroup><tbody><tr style="height:46.4219px;"><th class="align-left" style="background-color:rgb(240,241,242);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:0px;text-align:left;vertical-align:top;min-width:48px;font-weight:400;">Setting

</th><th class="align-left" style="background-color:rgb(240,241,242);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:0px;text-align:left;vertical-align:top;min-width:48px;font-weight:400;">Notes

</th></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">enabled</span>`

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">false</span>` (or omitting `<span class="editor-theme-code">containerBrowsers</span>`) disables the feature explicitly.

</td></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">ownerId</span>`

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Stable, unique per deployment.

</td></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">dockerHosts.<name>.context</span>` **or** explicit endpoint

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Choose one. An explicit TCP endpoint **requires** `<span class="editor-theme-code">tls</span>` with CA, client certificate, and key paths and is rejected without them.

</td></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">apiVersion</span>`

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">"auto"</span>` uses normal Docker CLI/server negotiation. A numeric value sets `<span class="editor-theme-code">DOCKER_API_VERSION</span>` only for commands this adapter launches.

</td></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">network.dsProxyHost</span>`

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Container-reachable address of DSServer's HTTP proxy (see above).

</td></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">runtime.platform</span>`

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Linux pools: keep `<span class="editor-theme-code">linux/amd64</span>` — the image uses Google's amd64 Chrome package. Do not simply change it on arm64 hosts.

</td></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">runtime.isolation</span>` (Windows pool)

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">process</span>` by default; change to `<span class="editor-theme-code">hyperv</span>` if the host needs Hyper-V isolation (change the image build flag too).

</td></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">minSize</span>` / `<span class="editor-theme-code">maxSize</span>`

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Warm containers / ceiling.

</td></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Image / `<span class="editor-theme-code">allowUnpinnedImage</span>`

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">The mutable `<span class="editor-theme-code">:local</span>` tag with `<span class="editor-theme-code">allowUnpinnedImage: true</span>` is development only. Production must pin an approved image digest.

</td></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">acquireRetryIntervalMs</span>` / `<span class="editor-theme-code">acquireRetryCount</span>`

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Example `<span class="editor-theme-code">5000</span>` / `<span class="editor-theme-code">4</span>` → a session start waits up to 20 s for a free lease. A released lease wakes waiters immediately. On deadline, startup fails with `<span class="editor-theme-code">POOL_EXHAUSTED</span>` and no session is retained.

</td></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">acquireTimeoutMs</span>`

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Legacy, still supported, cannot be combined with the retry settings above.

</td></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">cdpAdvertisedHost</span>`

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Linux pool: host DSServer uses to reach the published CDP port; must be reachable from DSServer.

</td></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">cdpContainerPort</span>`

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Supervisor CDP relay port inside the container (9222). Chrome itself listens on the next port (9223), bound to container loopback.

</td></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">extensionList</span>` (profile option)

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Comma-separated IDs of extensions baked into the image under `<span class="editor-theme-code">extensions/<id>/</span>`. Host extension directories are not copied at session time.

</td></tr></tbody></table>

## Step 3 — Host-specific setup

### Linux host (Docker Engine, Linux containers)

Assumes **rootful** Docker Engine on a Linux/amd64 host, the standard `<span class="editor-theme-code">bridge</span>` network, and DSServer on the same host.

1. Install Docker Engine per the official instructions for your distribution and start the daemon. Give the DSServer service account access to the daemon (socket/group access is root-equivalent — restrict to trusted operators). Confirm:  
    `<span class="editor-theme-code">docker info --format '{{.OSType}}'    </span>`*`<em class="editor-theme-code editor-theme-italic"># must print: linux</em>`*  
    `<span class="editor-theme-code">docker context show</span>`
2. Build from the repository root:  
    `<span class="editor-theme-code">docker build --platform linux/amd64 -f DSServer/container-browser/Dockerfile.linux-linux -t appvance/ds-chrome:local DSServer/container-browser</span>`
3. Find the bridge gateway and subnet:  
    `<span class="editor-theme-code">docker network inspect bridge --format '{{(index .IPAM.Config 0).Gateway}}'</span>`  
    `<span class="editor-theme-code">docker network inspect bridge --format '{{(index .IPAM.Config 0).Subnet}}'</span>`
4. Copy `<span class="editor-theme-code">containerBrowsers</span>` from `<span class="editor-theme-code">config/linux-linux.json</span>`; set `<span class="editor-theme-code">ownerId</span>`, `<span class="editor-theme-code">dockerHosts.engine.context</span>`, and replace `<span class="editor-theme-code">REPLACE-WITH-DOCKER-BRIDGE-GATEWAY-IPV4</span>` with the gateway.
5. Make DSServer's HTTP proxy listen on an interface reachable through that gateway (typically 9090) and allow inbound traffic **only from the bridge subnet**. `<span class="editor-theme-code">127.0.0.1</span>` inside a container is not the host.
6. Start DSServer; verify one session navigates, close it, start a replacement. CDP is published only to host loopback, so DSServer must run on this host.

**arm64 Linux hosts:** don't just change `<span class="editor-theme-code">runtime.platform</span>`. Use a compatible, validated browser image or explicitly accept and test amd64 emulation.

### Windows 11 (Docker Desktop, Linux and/or Windows containers)

Docker Desktop runs one engine mode at a time. `<span class="editor-theme-code">config/windows11-dual.json</span>` defines both pools; DSServer registers only the one matching the active engine **at startup**, so switching modes requires a DSServer restart.

1. **Prepare Docker Desktop.** Supported Windows 11 build with hardware virtualization enabled. Install Docker Desktop **for all users** — the per-user install does not support Windows containers. Windows container mode requires a Pro/Enterprise edition. For the `<span class="editor-theme-code">ltsc2025</span>` image with process isolation the host build must be compatible with Windows Server 2025 images (check Microsoft's version compatibility matrix).
2. **Build the Linux image.** Select *Linux containers* in the Docker tray menu, confirm `<span class="editor-theme-code">docker info --format '{{.OSType}}'</span>` prints `<span class="editor-theme-code">linux</span>`, then:  
    `<span class="editor-theme-code">docker build --platform linux/amd64 -f DSServer/container-browser/Dockerfile.windows-linux -t appvance/ds-chrome:local DSServer/container-browser</span>`
3. **Build the Windows image.** Switch to *Windows containers*, confirm the OS type prints `<span class="editor-theme-code">windows</span>`, test host/image compatibility first, then build:  
    `<span class="editor-theme-code">docker run --rm --isolation=process mcr.microsoft.com/windows/server:ltsc2025 cmd /</span>`c ver  
    `<span class="editor-theme-code">docker build --isolation=process -f DSServer/container-browser/Dockerfile.windows-windows -t appvance/ds-chrome-windows:local DSServer/container-browser</span>`  
    If process isolation isn't supported, review Hyper-V isolation requirements and change **both** the build flag and the Windows pool's `<span class="editor-theme-code">runtime.isolation</span>` to `<span class="editor-theme-code">hyperv</span>`. For build-only DNS problems add `<span class="editor-theme-code">--build-arg BUILD_DNS=<working-DNS-IP></span>`.
4. **Configure DSServer.** Copy `<span class="editor-theme-code">containerBrowsers</span>` from `<span class="editor-theme-code">config/windows11-dual.json</span>`; set `<span class="editor-theme-code">ownerId</span>`; set `<span class="editor-theme-code">dockerHosts.desktop.context</span>` (change from `<span class="editor-theme-code">default</span>` if needed). The DSServer process account must be able to run the Docker CLI — typically membership in `<span class="editor-theme-code">docker-users</span>`, followed by sign-out/sign-in.
5. **Proxy.** DSServer's proxy must be reachable at `<span class="editor-theme-code">host.docker.internal:9090</span>` from containers: listen on a container-reachable interface and add a Windows Firewall rule allowing **only the Docker private subnet** to that port.
6. **Start** DSServer after selecting the engine mode. Verify one session, stop it, start a second to check reuse before increasing load. Lower `<span class="editor-theme-code">minSize</span>`/`<span class="editor-theme-code">maxSize</span>` on a smaller workstation.

### Windows Server 2025 (native Docker, Windows containers)

Use a **Windows Server 2025** host. Docker Desktop is not supported on Windows Server; install a native Windows-container runtime (Docker CE/Moby). This recipe provides no Linux containers — those need a separate Linux Docker host and a reviewed remote-network design.

1. Install updates; make sure the host can reach Microsoft Container Registry, Chrome for Testing downloads, and Python downloads during the image build. Reserve disk and memory for the Windows base image and the pool.
2. Set up the container host per Microsoft's Windows Server container-host guide. In elevated PowerShell (review the script and your org policy first — it enables container features and may reboot):  
    `<span class="editor-theme-code">New-Item -ItemType Directory -Force C:\setup | Out-Null</span>`  
    `<span class="editor-theme-code">Invoke-WebRequest -UseBasicParsing https://raw.githubusercontent.com/microsoft/Windows-Containers/Main/helpful_tools/Install-DockerCE/install-docker-ce.ps1 -OutFile C:\setup\install-docker-ce.</span>`ps1  
    `<span class="editor-theme-code">powershell.exe -ExecutionPolicy Bypass -File C:\setup\install-docker-ce.ps1</span>`
3. After reboot, verify:  
    `<span class="editor-theme-code">Get-Service</span>` docker  
    docker context show  
    `<span class="editor-theme-code">docker info --format '{{.OSType}}'    </span>`*`<em class="editor-theme-code editor-theme-italic"># must print: windows</em>`*  
    `<span class="editor-theme-code">docker run --rm --isolation=process mcr.microsoft.com/windows/server:ltsc2025 cmd /c ver</span>`
4. Build from the repository root:  
    `<span class="editor-theme-code">docker build --isolation=process -f DSServer/container-browser/Dockerfile.windows-windows -t appvance/ds-chrome-windows:local DSServer/container-browser</span>`
5. Copy `<span class="editor-theme-code">containerBrowsers</span>` from `<span class="editor-theme-code">config/windows-server-2025-windows.json</span>`; set `<span class="editor-theme-code">ownerId</span>` and `<span class="editor-theme-code">dockerHosts.server.context</span>` (if not `<span class="editor-theme-code">default</span>`). Run DSServer under an account authorized for the Docker daemon with `<span class="editor-theme-code">docker</span>` on `<span class="editor-theme-code">PATH</span>`.
6. Find the NAT gateway and subnet:  
    `<span class="editor-theme-code">(docker network inspect nat | ConvertFrom-Json)[0].IPAM.Config | Select-Object Subnet,Gateway</span>`  
    Replace `<span class="editor-theme-code">REPLACE-WITH-HOST-NAT-IPV4</span>` in `<span class="editor-theme-code">network.dsProxyHost</span>` with the **Gateway**. DSServer's proxy must listen on that interface, and Windows Firewall must allow the **Subnet** to the proxy port (typically 9090). Do not open it publicly.
7. Start DSServer; verify one session, stop, start a replacement before growing the pool. CDP is only on each container's private NAT IPv4 and is never published.

### macOS (Docker Desktop, Linux containers)

Docker Desktop runs Linux containers in a VM. On **Apple Silicon** the linux/amd64 image runs under emulation — slower and heavier than an x86-64 Linux host. This procedure targets an **installed AIQ package** with its release-matched container-browser bundle.

1. **Verify Docker Desktop.**  
    `<span class="editor-theme-code">docker context show                                  </span>`*`<em class="editor-theme-code editor-theme-italic"># record it, commonly desktop-linux</em>`*  
    `<span class="editor-theme-code">docker info --format '{{.OSType}}/{{.Architecture}}' </span>`*`<em class="editor-theme-code editor-theme-italic"># OS must be linux</em>`*  
    `<span class="editor-theme-code">docker</span>` version  
    `<span class="editor-theme-code">uname -m                                             </span>`*`<em class="editor-theme-code editor-theme-italic"># arm64 on Apple Silicon (expected)</em>`*  
    On Apple Silicon, install Rosetta if `<span class="editor-theme-code">arch -x86_64 /usr/bin/true</span>` fails (`<span class="editor-theme-code">softwareupdate --install-rosetta</span>`), then in Docker Desktop **Settings → General** select the Apple Virtualization framework and enable *Use Rosetta for x86\_64/amd64 emulation on Apple Silicon*.
2. **Build and inspect.**  
    `<span class="editor-theme-code">cd <container-browser-bundle></span>`  
    `<span class="editor-theme-code">docker build --platform linux/amd64 -f Dockerfile.macos-linux -t appvance/ds-chrome:local .</span>`  
    `<span class="editor-theme-code">docker image inspect appvance/ds-chrome:local --format '{{.Os}}/{{.Architecture}}'   </span>`*`<em class="editor-theme-code editor-theme-italic"># must print linux/amd64</em>`*
3. **Smoke-test the image** before involving DSServer:  
    `<span class="editor-theme-code">docker run -d --name ds-chrome-macos-smoke --platform linux/amd64 -p 127.0</span>`.0.1::9222 appvance/ds-chrome:local  
    `<span class="editor-theme-code">docker exec ds-chrome-macos-smoke python3 /opt/appvance/browser-supervisor.py status     </span>`*`<em class="editor-theme-code editor-theme-italic"># idle</em>`*  
    `<span class="editor-theme-code">docker exec ds-chrome-macos-smoke python3 /opt/appvance/browser-supervisor.py manifest   </span>`*`<em class="editor-theme-code editor-theme-italic"># JSON: protocol, /usr/bin/google-chrome, Chrome version</em>`*  
    `<span class="editor-theme-code">docker rm -f ds-chrome-macos-smoke</span>`
4. **Configure.** Merge `<span class="editor-theme-code">containerBrowsers</span>` from the bundle's `<span class="editor-theme-code">config/macos-linux.json</span>` into `<span class="editor-theme-code"><AIQ-install>/config/global.json</span>`. Set `<span class="editor-theme-code">ownerId</span>` and `<span class="editor-theme-code">dockerHosts.desktop.context</span>`; keep `<span class="editor-theme-code">runtime.platform: linux/amd64</span>` and `<span class="editor-theme-code">dsProxyHost: host.docker.internal</span>`. On Apple Silicon start small (e.g. `<span class="editor-theme-code">minSize: 2</span>`, `<span class="editor-theme-code">maxSize: 10</span>`) and grow only after measuring memory, CPU, launch latency, and CDP responsiveness.
5. **Restart AIQ.** Start Docker Desktop first, stop AIQ with the installation's normal procedure, then start it again (e.g. `<span class="editor-theme-code">cd <AIQ-install> && ./startds.sh</span>`). Do not run Maven or a replacement JAR.
6. Verify using Step 4, including `<span class="editor-theme-code">verify-macos.sh</span>`.

## Step 4 — Verify

### Startup logs

In `<span class="editor-theme-code">OutputLogs/ds3output0.txt</span>` (installed package), confirm `<span class="editor-theme-code">Container pool engine ready</span>` for the matching pool, `<span class="editor-theme-code">Container pool warmed</span>` for the warm containers, and that the `<span class="editor-theme-code">ChromeContainerized</span>` profile is loaded. A configured pool for the other engine OS being hidden is expected (e.g. the Windows pool on a Linux engine).

### Proxy and pool connectivity

`<span class="editor-theme-code">curl -i --max-time 5 http://127.0.0.1:9090/          </span>`*`<em class="editor-theme-code editor-theme-italic"># any HTTP response (even 404) = proxy listening</em>`*  
`<span class="editor-theme-code">docker ps --filter 'label=appvance.ds.container-pool=chrome-linux'</span>`  
`<span class="editor-theme-code">docker exec <container-id> python3 /opt/appvance/browser-supervisor.py status        </span>`*`<em class="editor-theme-code editor-theme-italic"># warm containers: idle</em>`*  
`<span class="editor-theme-code">docker exec <container-id> python3 /opt/appvance/browser-supervisor.py probe-proxy host.docker.internal 9090   </span>`*`<em class="editor-theme-code editor-theme-italic"># must print: reachable</em>`*

On Linux / Windows Server use your `<span class="editor-theme-code">dsProxyHost</span>` (bridge or NAT gateway) instead of `<span class="editor-theme-code">host.docker.internal</span>`. The commands use Linux image paths; adjust for the Windows image.

### Lease, cleanup and reuse

1. Select `<span class="editor-theme-code">ChromeContainerized</span>`, start a session, navigate to a simple page. The leased container's `<span class="editor-theme-code">status</span>` must start with `<span class="editor-theme-code">running:</span>`.
2. Stop the session; the container returns to `<span class="editor-theme-code">idle</span>`.
3. Start a replacement session and navigate again — this proves cleanup and reuse, not just first launch.

For concurrency testing, keep one or two spare pool slots and replace sessions in small batches (start replacements first, then stop the old ones) to avoid pool exhaustion. Use bounded navigation retries for external sites and record session readiness separately from page success.

### macOS packaged verifier (verify-macos.sh)

Shipped in the release bundle; it does not change AIQ configuration. It creates one disposable container with DSServer's settings, checks both network directions, and removes it on exit.

`<span class="editor-theme-code">cd <container-browser-bundle></span>`  
`<span class="editor-theme-code">chmod</span>` +x verify-macos.sh  
`<span class="editor-theme-code">./verify-macos.sh --aiq-install <AIQ-install>                         </span>`*`<em class="editor-theme-code editor-theme-italic"># infrastructure checks</em>`*  
`<span class="editor-theme-code">./verify-macos.sh --aiq-install <AIQ-install> --observe-session 180   </span>`*`<em class="editor-theme-code editor-theme-italic"># start ChromeContainerized from the UI when prompted</em>`*  
`<span class="editor-theme-code">./verify-macos.sh --aiq-install <AIQ-install> --mcp                   </span>`*`<em class="editor-theme-code editor-theme-italic"># only if loopback MCP is already enabled</em>`*  
`<span class="editor-theme-code">AIQ_MCP_TOKEN='<token>' ./verify-macos.sh --aiq-install <AIQ-install> --mcp   </span>`*`<em class="editor-theme-code editor-theme-italic"># bearer token kept off the command line</em>`*

Observed-session checks walk the full route: container → `<span class="editor-theme-code">host.docker.internal:9090</span>`; Chrome launched with `<span class="editor-theme-code">--proxy-server</span>`; Chrome CDP on 9223 inside the container; supervisor relay on 9222; 9222 published to a dynamic host-loopback port; host reaches `<span class="editor-theme-code">/json/version</span>` through it. The script never enables MCP or edits `<span class="editor-theme-code">mcp.json</span>`.

## Troubleshooting

### Session closes unexpectedly

- **Closes immediately** → usually a proxy or Chrome-start failure.
- **Closes after ~130 seconds** → CDP route problem: DSServer closes a browser when its native connector can't attach within that window.

### First verifier failure → likely fault

<table id="bkmrk-first-failurelikely-" style="margin:24px 0px 0px;border-collapse:collapse;width:760px;border:1px solid rgb(221,222,225);table-layout:fixed;font-size:1em;height:1px;"><colgroup><col></col><col></col></colgroup><tbody><tr style="height:46.4219px;"><th class="align-left" style="background-color:rgb(240,241,242);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:0px;text-align:left;vertical-align:top;min-width:48px;font-weight:400;">First failure

</th><th class="align-left" style="background-color:rgb(240,241,242);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:0px;text-align:left;vertical-align:top;min-width:48px;font-weight:400;">Likely fault

</th></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">DSServer proxy is not accepting host connections</span>`

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Proxy disabled, not listening, or on a different port.

</td></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">container cannot reach DSServer proxy</span>`

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Docker can't route `<span class="editor-theme-code">dsProxyHost</span>` to the proxy, or a firewall is blocking it.

</td></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">Chrome CDP does not respond ... 9223</span>`

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Chrome failed or exited inside the image.

</td></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">container CDP relay does not respond ... 9222</span>`

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Supervisor/relay missing, incompatible, or failed.

</td></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">Docker did not publish ... 9222</span>`

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Pool container created without the dynamic loopback mapping, or AIQ is using a different Docker context.

</td></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">host cannot reach Chrome CDP through the published port</span>`

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Docker Desktop host-loopback forwarding failed or was blocked.

</td></tr></tbody></table>

If every route check passes but sessions still close, compare the installed DSServer and container-browser bundle versions and inspect the lifecycle errors from `<span class="editor-theme-code">OutputLogs</span>`. Send support the full verifier output starting at the first `<span class="editor-theme-code">FAIL</span>` line.

### GPU process launch failed: error\_code=1002 (macOS)

Emitted after Chrome starts when a GPU child-process launch fails. It is **not** a DSServer proxy error. On Apple Silicon, first check the amd64 emulation path:

`<span class="editor-theme-code">cd <container-browser-bundle></span>`  
`<span class="editor-theme-code">./diagnose-macos-gpu.sh --aiq-install <AIQ-install> > macos-gpu-diagnostic.txt 2>&1</span>`

The redacted report records host, Docker Desktop version, virtualization backend, Rosetta status, context, engine resources, image identity, Chrome version, and a three-mode Chrome launch matrix. Attach it with the `<span class="editor-theme-code">verify-macos.sh</span>` output.

- `<span class="editor-theme-code">rosetta_host_translation</span>` and `<span class="editor-theme-code">docker_vmm_rosetta</span>` should both be `<span class="editor-theme-code">true</span>`; otherwise fix Rosetta (macOS step 1), restart Docker Desktop, then restart AIQ so pool containers are recreated.
- If `<span class="editor-theme-code">current</span>` fails but `<span class="editor-theme-code">no-software-rasterizer</span>` succeeds, the failure is in Chrome's graphics path. **As a temporary diagnostic only**, add the options below to the `<span class="editor-theme-code">ChromeContainerized</span>` profile, restart AIQ, and retry one session. This disables WebGL/software GPU rendering and can change application behaviour — not a production default.
- If every mode shows `<span class="editor-theme-code">qemu</span>`, `<span class="editor-theme-code">SIGTRAP</span>`, zygote, or network-service crashes, fix Docker Desktop's amd64 emulation, not AIQ proxy settings.

`<span class="editor-theme-code">{"name": "disable-gpu", "value": "true"},</span>`  
`<span class="editor-theme-code">{"name": "experimentalDS3", "value": "--disable-software-rasterizer"}</span>`

Reference working Apple Silicon host (comparison values, not minimums)

### Other common issues

<table id="bkmrk-symptomlikely-cause-" style="margin:24px 0px 0px;border-collapse:collapse;width:760px;border:1px solid rgb(221,222,225);table-layout:fixed;font-size:1em;height:1px;"><colgroup><col></col><col></col></colgroup><tbody><tr style="height:46.4219px;"><th class="align-left" style="background-color:rgb(240,241,242);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:0px;text-align:left;vertical-align:top;min-width:48px;font-weight:400;">Symptom

</th><th class="align-left" style="background-color:rgb(240,241,242);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:0px;text-align:left;vertical-align:top;min-width:48px;font-weight:400;">Likely cause / fix

</th></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">ChromeContainerized</span>` profile missing

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Docker unreachable at startup, wrong context, or pool OS doesn't match engine mode. Check `<span class="editor-theme-code">docker context show</span>`, fix config, restart DSServer.

</td></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">POOL_EXHAUSTED</span>` on session start

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">All leases busy for the full retry window (~20 s default). Increase pool size (if memory allows) or retry settings; keep spare slots during batch replacement.

</td></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Windows build fails downloading Chrome/Python

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">--build-arg BUILD_DNS=<working-DNS-IP></span>`.

</td></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Windows container won't start with process isolation

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Host build incompatible with `<span class="editor-theme-code">ltsc2025</span>` — check Microsoft's matrix, or switch build flag and `<span class="editor-theme-code">runtime.isolation</span>` to `<span class="editor-theme-code">hyperv</span>`.

</td></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Windows containers unavailable on Windows 11

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Docker Desktop installed per-user, or Home edition. Reinstall for all users on Pro/Enterprise.

</td></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">DSServer can't run Docker on Windows 11

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Service account not in `<span class="editor-theme-code">docker-users</span>` (sign out/in after adding).

</td></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Config rejected for TCP endpoint

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">tls</span>` CA/cert/key paths missing.

</td></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Config rejected for acquire settings

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">`<span class="editor-theme-code">acquireTimeoutMs</span>` combined with the retry settings — use one style.

</td></tr><tr><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Containers disappear when another server starts

</td><td class="align-left" style="background-color:rgb(255,255,255);border-width:1px 0px 0px 1px;border-style:solid;border-color:rgb(221,222,225);padding:8px;text-align:left;min-width:48px;font-weight:400;vertical-align:top;">Two DSServer deployments share an `<span class="editor-theme-code">ownerId</span>`.

</td></tr></tbody></table>

## Production checklist (not yet complete)

Pin an approved image digest; set `<span class="editor-theme-code">allowUnpinnedImage</span>` to `<span class="editor-theme-code">false</span>`

Size the pool for host memory and CPU

Unique, stable `<span class="editor-theme-code">ownerId</span>` per deployment

Docker daemon access restricted to the DSServer account and trusted operators

Proxy firewall rules limited to the Docker private subnet; CDP never public; mTLS and a private CDP route for any remote Docker host

Release-matched container-browser bundle for installed packages

Acceptance checklist in the implementation progress log complete

## References

- `<span class="editor-theme-code">DSServer/container-browser/README.md</span>` and `<span class="editor-theme-code">guides/</span>` (`<span class="editor-theme-code">linux.md</span>`, `<span class="editor-theme-code">macos.md</span>`, `<span class="editor-theme-code">windows-11.md</span>`, `<span class="editor-theme-code">windows-server-2025.md</span>`)
- Config examples: `<span class="editor-theme-code">DSServer/container-browser/config/</span>`
- Implementation progress log: `<span class="editor-theme-code">documentation/BrowserManager/design/containerized-browser-pool-implementation-progress.md</span>`
- [Install Docker Engine](https://docs.docker.com/engine/install/)
- [Linux post-installation steps for Docker Engine](https://docs.docker.com/engine/install/linux-postinstall/)
- [Install Docker Desktop on Windows](https://docs.docker.com/desktop/setup/install/windows-install/)
- [Install Docker Desktop on Mac](https://docs.docker.com/desktop/setup/install/mac-install/)
- [Change your Docker Desktop settings](https://docs.docker.com/desktop/settings-and-maintenance/settings/)
- [Explore networking how-tos on Docker Desktop](https://docs.docker.com/desktop/features/networking/networking-how-tos/)
- [Prepare Windows operating system containers](https://learn.microsoft.com/en-us/virtualization/windowscontainers/quick-start/set-up-environment)
- [Windows container version compatibility](https://learn.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/version-compatibility)
- [Windows container networking](https://learn.microsoft.com/en-us/virtualization/windowscontainers/container-networking/architecture)