Scan PDF documents

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 PDF documents, which you need for the following use cases:

In all other use cases, such as checking for broken links, you'll work with standard modules instead. For more information, check out Create tests for links, barcodes, and QR codes.

Start the scan

To start the scan, follow these steps:

  1. Open the test case building area by selecting Create test case in the menu bar on the left.

  2. Select Modules and then + Create module.

  3. Select PDF document from the dropdown menu.

Add a content preview

By default, the PDF Scan window shows the following: 

  • The PDF file.

  • The names and types of the PDF controls you choose during the scan.

To display the content of a chosen control, select Show Content Preview in the ribbon menu.

This helps you make sure your selection has the right content. It also gives you access to the Force optical recognition option, in case Tosca Cloud doesn't properly recognize a control's content.

Additional options in the scan interface

The PDF Scan menu also offers the following options:

Ribbon menu option

Description

Zoom

Change the zoom level of the PDF View.

Zoom Fit

Enlarge the scanned PDF to fit the PDF View.

Show/Hide scanned areas

Show or hide the scanned areas in the PDF View.

Select Document Language

Select the language of the scanned PDF. The PDF Scan uses this language for optical character recognition (OCR).

Choose your controls

There are different ways to define the PDF controls you want to add to your module: 

  • Define a control by its absolute position.

  • Define a control by its relative position to another element. This is useful if a PDF element doesn't have an absolute position, but always appears in a specific position relative to another PDF element.

    Let's say you're testing invoices and want to verify that Net price shows the right price. Depending on the length of the itemized list, Net price might appear further up or down on the page. So, it doesn't have an absolute position. However, it always appears right above Gross price. So, it always appears in a specific position relative to another element.

  • Define repetitive areas. This is useful if an element appears in the same area on multiple pages of the document.

    Let's say you want to verify that the copyright notice appears at the bottom of all pages. Instead of defining the control separately for every single page, you can create a repetitive area for the entire document.

Please choose your use case:

Edit controls during the scan

You can edit your controls during the scan: 

  • To select an area, select it in the PDF View or on the list of controls.

  • To jump to a control in the PDF View, double-click the control on the list, or use the Jump icon.

  • To change the name of a control, double-click its name.

  • To change the size of an area or move it, manipulate the rectangle in the PDF View.

  • To change the type of a control, right-click it in the PDF View and select a new type from the context menu.

  • To redraw a control, select the Redraw icon in the list of controls.

  • To delete a control, select the Delete icon in the list of controls, or right-click the area in the PDF View and select Remove this control from the context menu.

Rescan

If you want to add or change controls in your module, rescan your PDF file. Please note the following limitations: 

  • You can't delete controls during the rescan.

  • You can't change the control type during the rescan.

What's next

Now that you have your PDF modules, you can start creating PDF test cases.