Hi Team,
I have a requirement in UiPath where:
A PDF file is opened inside Google Chrome browser.
I use Ctrl + F to search for a specific treasure code inside the PDF.
Currently, I am using Take Screenshot activity, but it captures the full page.
The new requirement is to capture only the specific line where the treasure code appears.
postwick
(Paul Ostwick)
February 19, 2026, 3:55pm
2
Is there any reason why you don’t want to just extract the code as text?
Anyway, you can use the (classic) Find OCR Text Position (assuming the PDF is a scan) or the Find Text Position activity if it’s actually text.
The output will be a UIElement which you can then pass to the Input Element property of the Take Screenshot activity.
Find Text Position activity gives error - Text not found (but i am able to manually find the treasury code using ctrl+f)
postwick
(Paul Ostwick)
February 19, 2026, 5:02pm
4
Is the text visible on the screen when the Find Text Position activity executes?
Yes text is clearly visible
postwick
(Paul Ostwick)
February 19, 2026, 5:05pm
6
Not sure how identifying elements by text works in a PDF. Did you indicate the specific Chrome element where the page itself is displayed, as the selector for Find Text?
If that still doesn’t work, try the Find OCR Text Position activity.
Could you please share another approach, Find Text Position Activity unable to find text.
Hi Team,
I have a requirement in UiPath where:
A PDF file is opened inside Google Chrome browser.
I use Ctrl + F to search for a specific treasure code inside the PDF.
Currently, I am using Take Screenshot activity, but it captures the full page.
The new requirement is to capture only the specific line where the treasure code appears.
Hi @Shivam_Rana1
If you are manually using ctrl+F to find the code and the requirement is to just find the code.
Then you can use read pdf text activity or read pdf with ocr to read the whole pdf and then use regex on the output to find your code.
Hope this helps.
Regards
Sonali
ashokkarale
(Ashok Karale)
February 20, 2026, 8:43am
10
Hello @Shivam_Rana1
Duplicate questions won’t fetch the answer quickly. Avoid creating multiple threads for the same issue as it will also be difficult to track the answers
2 Likes
@ashokkarale you are right!
Found duplicate topic
Hi Team,
I have a requirement in UiPath where:
A PDF file is opened inside Google Chrome browser.
I use Ctrl + F to search for a specific treasure code inside the PDF.
Currently, I am using Take Screenshot activity, but it captures the full page.
The new requirement is to capture only the specific line where the treasure code appears.
@Shivam_Rana1 Kindly refrain from doing so.
Actually, the scenario is to first identify the Treasury code from multiple Treasury codes, then take a screenshot of the particular line instead of capturing the full page, and finally attach that screenshot in the Excel template.
postwick
(Paul Ostwick)
February 20, 2026, 2:50pm
13
Have you tried the Find OCR Text Position activity? Find Text Position and Find OCR Text Position are two different activities.
Yes i have tried but its not working