TOSCA XSCAN

TOSCA XSCAN Guide: Add New Controls and Resolve Duplicates

Table of Contents

Introduction

Tricentis TOSCA stands out with its scriptless, model-based testing approach, making it a leading choice in modern test automation. One of the key tools within TOSCA that enhances its UI test automation strength is TOSCA XSCAN. This intuitive scanning utility allows testers to capture and manage UI elements for testing purposes. However, working with dynamic or duplicate UI controls can sometimes be challenging.

This comprehensive guide will walk you through how to efficiently use TOSCA XSCAN to add new controls, leverage advanced options, resolve duplicates, and identify unique properties that help create reliable and maintainable test cases. We will also cover hands-on instructions, best practices, and a real-world example from the Demo Webshop site.

Whether you are just starting your TOSCA Training journey or aiming to align with the Tricentis TOSCA Certification Roadmap, mastering these features of TOSCA XSCAN is essential.

What is TOSCA XSCAN?

TOSCA XSCAN is TOSCA’s built-in utility to scan and identify UI elements of web, desktop, or mobile applications. It creates modules that contain the properties and actions of these controls, enabling automation engineers to interact with the UI.

Through TOSCA XSCAN, users can:

  • Add new controls to modules
  • Inspect control properties
  • Use filters and search options
  • Handle duplicated controls by defining unique properties

Understanding and using these features effectively ensures that your automated tests remain stable and resilient.

Adding New Controls with TOSCA XSCAN

Step-by-Step Guide to Add Controls

  1. Launch TOSCA XSCAN from the module section of your test case.
  2. Select the window or application you want to scan.
  3. Once the screen loads, click on Scan to capture all visible controls.
  4. TOSCA will display scanned controls in a hierarchical tree view.
  5. If a needed control is not listed, use the Add New Control feature.

How to Add New Controls

  • Click the checkbox next to the control name to add it to your module.
  • Use the Filter or Search bar to quickly locate the control.
  • Once selected, click Finish to save the control to the module.

This functionality is especially helpful when scanning large pages or complex interfaces where not all controls are immediately visible.

Using Advanced Options in TOSCA XSCAN

TOSCA XSCAN

TOSCA XSCAN offers several advanced options to customize and enhance your scanning session:

  • Add Extra Properties: Allows you to include additional attributes for a control.
  • Highlight on Screen: Visually verifies the selected control in the application.
  • Drag Select: Enables drag-selecting a portion of the UI to focus on controls in that region.
  • Show All Controls: Reveals even those elements that are not usually interactable, like hidden buttons or disabled fields.

These tools make it easier to capture exactly the controls you need for testing, providing clarity and reducing ambiguity.

Viewing Control Details with Drag Select

When working with complicated screens, the Drag Select feature simplifies navigation:

  • Click the Drag Select icon.
  • Draw a rectangle over the portion of the screen where the control exists.
  • The scanner filters the display to show only controls within that area.

This is particularly useful when testing dashboards or composite UI elements with many nested components.

Identifying Unique Properties for Duplicate Controls

The Duplicate Control Problem

Some applications, like the Demo Webshop, feature duplicate UI controls. For example, the category menu (Books, Computers, etc.) appears in both the header and sidebar. When both sets are scanned in a single module, TOSCA XSCAN highlights them in orange. This indicates that the controls are not uniquely identifiable because their properties match.

Why It Matters

Duplicate controls can:

  • Cause false positives/negatives in test results
  • Lead to automation failures
  • Complicate module maintenance

Solving this requires selecting unique properties for each control.

How to Resolve Duplicate Controls in TOSCA XSCAN

Step-by-Step Guide

  1. Open TOSCA XSCAN and inspect the duplicated controls.
  2. Look at the properties TOSCA has captured by default: ID, Name, InnerText, Index, etc.
  3. Identify which properties are identical across the duplicates (these are not useful).
  4. Choose alternate or additional properties that make each control unique. Consider:
    • XPath: Precise, location-based identifier.
    • CSS Class: Use if one control has a unique styling.
    • Position Index: Only if it doesn’t change across page reloads.
    • Title, AltText, Custom Attributes: Semantic and less volatile.
  5. Once you select the unique combination, the orange highlight disappears, confirming uniqueness.

Best Practices for Working with Duplicate Controls

  1. Avoid Relying on Index Alone
    • Index-based identifiers may break with UI changes.
    • Use only if the position is guaranteed to remain fixed.
  2. Prefer Semantic Properties
    • Labels, tooltips, or alt text often provide more stable identification.
    • These attributes rarely change unless there is a content update.
  3. Use Separate Modules for Each Set
    • If the same control appears in multiple sections (e.g., header and sidebar), consider scanning them into separate modules or business components.
    • This improves clarity and reduces conflict.
  4. Leverage Highlight on Screen
    • Always use the Highlight on Screen feature after selecting unique properties to confirm you’re referencing the right element.
  5. Maintain a Control Property Checklist
    • Keep a documented list of control attributes per application to streamline your scanning process across projects.

Using TOSCA XSCAN to Add Extra Properties

At times, the default properties captured by TOSCA XSCAN are insufficient. In such cases, manually adding extra properties helps in:

  • Identifying controls with greater precision
  • Reducing duplication errors
  • Enhancing module reusability

How to Add Extra Properties:

  1. Select the control from the scanned list.
  2. Right-click and choose Edit Properties.
  3. In the dialog box, click Add Property.
  4. Select relevant attributes such as:
    • Data-testid
    • Custom ID
    • Role
    • Class
    • XPath

These properties give you greater control and flexibility while designing automated test cases.

Filtering and Searching in TOSCA XSCAN

When working with large applications, the Filter and Search features save significant time.

Using Filter:

  • Click on the Filter icon.
  • Select criteria such as control type, visibility, or attributes.
  • The list updates to match the applied filters.

Using Search:

  • Type a partial or full keyword in the search bar.
  • Matches appear instantly, narrowing down your view.

This is particularly helpful in identifying hidden or nested controls.

Highlighting Controls on Screen

The Highlight on Screen feature allows you to visually validate controls before finalizing your module.

How to Use:

  1. Select a control.
  2. Click the Highlight on Screen button.
  3. The control is outlined in red or another color in the application.

This ensures that you are linking the correct control to your test step, especially in complex layouts.

Real-World Example: Demo Webshop

Let’s apply the above concepts to a real-world example:

Scenario:

In the Demo Webshop, the categories (Books, Computers, etc.) appear twice:

  • Top navigation
  • Sidebar menu

Problem:

Using TOSCA XSCAN to scan both leads to duplicate controls. All share similar InnerText and Index properties, so TOSCA flags them in orange.

Solution:

  • Inspect each control using TOSCA XSCAN.
  • Identify default properties: InnerText = “Books”, Index = 1
  • Add extra property: XPath for each location
  • Confirm uniqueness by checking the orange highlight disappears
  • Use “Highlight on Screen” to validate selection

Outcome:

Now, each control is uniquely identified, avoiding test failures and improving module reliability.

Why Mastering TOSCA XSCAN Matters

  • Better Test Stability: Avoid flaky tests by accurately identifying elements
  • Faster Test Creation: Search and filter improve speed
  • Scalable Automation: Clean module management supports future growth

Mastering TOSCA XSCAN equips testers with the tools to build enterprise-grade automation frameworks that are both efficient and sustainable.

Conclusion

Understanding how to use TOSCA XSCAN for adding new controls and resolving duplicates is essential for creating robust automated tests. With features like advanced options, drag select, highlight on screen, and property editing, you gain full control over your UI interaction.

Whether you’re preparing for the TOSCA Automation Course Online or aiming to navigate the Tricentis TOSCA Certification Roadmap, expertise in TOSCA XSCAN will set you apart in the QA automation field.

Get hands-on with TOSCA XSCAN and elevate your automation testing skills now. Unlock precision, efficiency, and confidence in every module you build.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Share this article
Enroll Free demo class
Enroll IT Courses

Need a Free Demo Class?
Join H2K Infosys IT Online Training
Subscribe
By pressing the Subscribe button, you confirm that you have read our Privacy Policy.

Join Free Demo Class

Let's have a chat