Mobile xScan
Similar to Appium Inspector, when working with the Perfecto-Tosca integration, you can use Mobile xScan to look up or locate elements of an application. This section guides you through the setup based on the Tosca version you work with.
1 | Set up the xScan integration
- Open Tosca in Admin mode.
-
In the Tosca Settings dialog, check the path where the
.conf
files are located. In this example, the path is:C:\ProgramData\TRICENTIS\TOSCA Testsuite\7.0.0\Automation\Mobile30\Configuration
-
Add a configuration file for Perfecto called
perfecto.conf
. This file specifies the browser, device name, and Perfecto security token to use during the scan. The following image shows sample content.
2 | Connect to a Perfecto device and start the scan
- In Tosca, click the module and select Scan Application > Mobile > Mobile Scan. The XScan wizard opens.
-
In the Select Application panel, enter the relevant values, as follows:
- Device type: The device operating system (Android or iOS)
- Configuration: The name of the configuration file that you created earlier (
perfecto.conf
) - Device name: The ID of the mobile device that you want to connect to
- Appium server: The URL of your Perfecto cloud
- Web/App switch: The URL of the website or the name of the app to test
-
Click Connect.
After 30 seconds to 1 minute, the live view should launch.
1 | Launch the Mobile Scan wizard
- In Tosca, create a new project and a new module.
-
Right-click the module and select Scan > Mobile.
2 | Add a Perfecto device
In the Mobile Scan wizard, do the following:
- Click Add device.
- In the Add device panel, click Add new.
-
In the Add connection panel, select Perfecto as the connection type.
-
Provide the Appium Server address (which is the URL of your Perfecto cloud) and your Perfecto security token, and click Add.
-
In the Add device panel, enter a name for your device, provide the device ID, select the device type, and click Add.
If the connection is successful, you should see a new device added to the Mobile Scan wizard.
3 | Add a native/hybrid app
To scan a native or hybrid app, in the Mobile Scan wizard, do the following:
- Click Add app.
-
In the Add application panel, select Native/Hybrid and click Continue.
- In the Add native/hybrid application panel, select one of the following:
Android: Enter the application name and specify the PackageName/Activity Name. For example:
com.sec.android.app.popupcalculator/com.sec.android.app.popupcalculator.Calculator
iOS: Enter the application name and specify the BundleId. For example:
com.appleNumbers
- Click Add.
4 | Add a web app
To scan a web app, in the Mobile Scan wizard, do the following:
- Click Add app.
-
In the Add application panel, select Web and click Continue.
-
In the Add web application panel, enter a name for the application and provide the URL in the format shown in the image. Then click Add.
5 | Start the scan
To launch the scan, select the device and the app and click Connect.
After 30 seconds to 2 minutes, the connection should be established and the live view launched.