Sample 3. Step 23: Detecting the name of the Country field with a kwOrigin element
We will use an element of type Static Text and the keyword “OriginOfGoods:” to detect the name of the Country field.
To create the kwOrigin element:
- In the Footer element, create an element of type Static Text and name it kwOrigin.
- Click the Static Text tab.
- In the Search text field, enter the text to find: “OriginOfGoods:”.
- Click the Relations tab.
- Since the Country field can only be located below the footer of the table, set the following search constraint:
- Below the element Footer.kwFooter, Offset = 0.
- Click the Advanced tab.
- Since the Country field is located in the left half of the image, set the following additional search constraint in the Advanced pre-search relations: Look for the object in the left half of the page. In the FlexiLayout language
LeftOf: PageRect.Left + PageRect.Width/2; - Try matching the FlexiLayout with the test images and make sure that the program successfully detects the element on all the images where applicable.
12.04.2024 18:16:02