Scan with Vision AI
Your application has various controls, which are elements that Tosca Cloud interacts with when you run your tests. To make this possible, you must first scan your application. This gets the necessary technical data into Tosca Cloud.
This topic explains how to scan
Supported version
For information on supported version, check out system requirements.
Start the scan
To start the scan, follow these steps:
-
Open the test case building area by selecting
Create test case in the menu bar on the left.
-
Select Modules and then + Create module.
-
Right click the application you want to scan and select Vision AI from the context menu.
-
Select Scan.
-
Select your controls and save the modules.
If necessary, you can optimize your scan results:
Choose a neural network
To tell Tosca Cloud which neural network on the server to use for finding controls and performing OCR, adjust the following parameters in the Steering section of Tosca XScan:
When you change the value of either, Tosca XScan will prompt you to rescan.
Change the control type
Vision AI recognizes several different types of controls. The steering mechanism varies from type to type. For optimal steering, you can adjust the control type to best match your actual control. To do so, follow the steps below:
-
In Tosca XScan, select your control and switch to Advanced View.
-
In the Identify by Properties pane, go to Technical properties.
-
For ControlType, select a new control type from the drop-down list. Tosca XScan displays only the control types it detected.
-
Optionally, if you want to specify which neural network on the server to use for finding controls and performing OCR, change the following parameters in the Steering section:
-
Save your module and close Tosca XScan.
Change the control type via the TreatAs parameter
If Vision AI doesn't detect the correct control type, you can change it manually in Tosca XScan.
To do so, follow the steps below:
-
In Tosca XScan, select your control and switch to the Advanced View.
-
In the Identify by Properties pane, select Load all Properties.
-
Go to Technical>TreatAs and select the control type that you want.
Change the control label
Vision AI's optical character recognition (OCR) might sometimes make spelling errors in label names. We recommend using an accurate label value to improve test reliability.
You can adjust label names to match the actual label of a control. To do so, follow these steps:
-
In Tosca XScan, select your control and switch to Advanced View.
-
In the Identify by Properties pane, go to Technical properties.
-
For the Label property, change the label of a control to match the actual label.
-
Save your module and close Tosca XScan.
Change the parameters for table detection and steering
Apart from standard table steering parameters for tables, provides additional table steering parameters that enable you to detect and steer tables more efficiently.
To adjust table parameters, follow the steps below:
-
In Tosca XScan, select your table control and switch to the Advanced View.
-
Select Show Content Preview to open the Content View pane.
In the Content View pane, you can see how changes in table steering parameters affect the table.
-
In the Identify by Properties pane, you can change the following additional parameters:
-
Save your module and close Tosca XScan.
Add user identified controls
You can teach Vision AI how to work with controls that it doesn't recognize correctly. For example, if it doesn't recognize a table as a table. In these cases, you can create user identified controls (UIDCs) that rely on surrounding controls as anchor points. Vision AI leverages these anchor points to identify the controls.
The anchors you create teach Vision AI to find your UIDC correctly. We recommend the following best practices when selecting anchors:
-
Create more than one anchor.
-
Use text labels as anchors.
-
Have more than one anchor at each side or corner of the control.
-
Place anchors on the left and right. This allows the control to change in size horizontally.
-
Place anchors on the top and bottom. This allows the control to change in size vertically.
Create UIDCs
To create a UIDC, follow these steps:
-
Open Tosca XScan by starting a scan and making sure Tosca XScan is in Advanced View.
-
In Tosca XScan, right click the main item and select Create User Identfied Contol.... The Vision AI assistant opens and shows a preview of your application.
-
Draw a box around the control you want to identify.
-
In the preview of your application, click the controls you want to use as anchors. If you need to, you can select text inside the control. For example, column headers.
-
Enter the following information for your new control:
-
Control Name: a unique name for the new control
-
Control type: select the type from the drop down
-
Application: select the drop down or enter a new name
-
-
Select Save.
In the subsequent dialog, select Yes to rescan your application.
-
Select Select on screen to click the control in your application once again. Your control is now recognized by the parameters you specified in the Vision AI assistant.
Use categories for UIDCs
UIDC categories let you group and reuse UIDCs across different scans of the same application. For example, when the application has multiple views, modes, or screen. This means you can have sets of application specific UIDCs. Use the steering parameter UidcCategory to create a UIDC category and reuse any UIDCs associated with it.
To create a UIDC category, enter a name for your category in Application when you create a UIDC.
To reuse a UIDC, enter the name you used for Application in the Tosca XScan steering parameter UidcCategory. Tosca Cloud then rescans and your UIDCs appear in Tosca XScan.
What's next
Now that you've used Vision AI to create modules, you can use them in your test cases with Vision AI parameters as needed.