Learn the recommended method for identifying the right PDF file in UiPath when scraping data from reports with varying numbers in the title using wildcard characters.
Table of Contents
Question
A developer created an automation which scrapes data from PDF reports. The reports have the same structure and the title format is always “Report X – PDF”, where X is a number from 1 to 100. Only one report wil be open at a time but other PDF files may be open on the desktop.
What is the recommended method to ensure the selector identifies the correct PDF to use?
A. Use the ? wildcard character in place of the idx attrbute value
B. Use the * wildcard character in place of the “X” in the title attribute value
C. Use the * wildcard character in place of the title attribute value
D. Use the idx attribute value in the selector to increment for each file
Answer
B. Use the * wildcard character in place of the “X” in the title attribute value
Explanation
When automating data scraping from PDF reports in UiPath where the report titles follow a consistent format like “Report X – PDF” but the number “X” varies from 1 to 100, the best approach is to use a wildcard character in the selector.
Specifically, you should use the * wildcard in place of the number in the title attribute value. For example, the selector would look something like:
<pdf> <title>Report * - PDF</title> </pdf>
The * wildcard matches any sequence of characters. This will allow the selector to correctly identify the desired PDF report regardless of which number appears in the title, as long as the rest of the title matches the specified format.
Using a wildcard for the entire title value would be too broad, as it may match other open PDFs that aren’t part of this report series. Incrementing the idx attribute also wouldn’t work, since idx refers to the order in which PDFs were opened, not the report number in the title.
So in summary, choice B of using the * wildcard in place of the number in the title is the most targeted and reliable way to select the correct PDF report in this scenario.
UiPath UiRPA certification exam assessment practice question and answer (Q&A) dump including multiple choice questions (MCQ) and objective type questions, with detail explanation and reference available free, helpful to pass the UiPath UiRPA exam and earn UiPath UiRPA certification.