selrac
June 10, 2017, 6:14pm
1
I’m having some trouble setting partial selectors when reading ‘Get Text’ in PDF files.
The selector seems to indicate the references to the text is reading and I can not manage to amend it to make it work.
For example, the following selectors from two different files
<wnd app='acrord32.exe' cls='AcrobatSDIWindow' title='document n. 7117143908.pdf - Adobe Reader' />
<wnd cls='AVL_AVView' title='AVPageView' />
<ctrl name='7117143908 09/06/2017 1/1 ' role='text' />
<wnd app='acrord32.exe' cls='AcrobatSDIWindow' title='document n. 7117143909.pdf - Adobe Reader' />
<wnd cls='AVL_AVView' title='AVPageView' />
<ctrl name='7117143909 09/06/2017 1/1 ' role='text' />
Which I tried to modify as
<wnd app='acrord32.exe' cls='AcrobatSDIWindow' title='document n. *.pdf - Adobe Reader' />
<wnd cls='AVL_AVView' title='AVPageView' />
<ctrl name='*' role='text' />
and
<wnd app='acrord32.exe' cls='AcrobatSDIWindow' title='document n. *.pdf - Adobe Reader' />
<wnd cls='AVL_AVView' title='AVPageView' />
<ctrl role='text' idx='2' />
but I keep getting an error saying that it can not find the selector
Any ideas on how I can set it up properly?
Sample processMain.xaml (30.0 KB)
Sample invoices available privatelly
selrac
June 10, 2017, 11:14pm
3
It doesn’t seem to work
It doesn’t find the Invoice element. I have the file open when running the xaml
I see in UiExplorer the anchor you have selected
What I found strange is that if I select the full selector as the ‘find element’ it still doesn’t work
vvaidya
(Vinay Vaidya)
June 10, 2017, 11:23pm
4
Try attach live element and select invoice
vvaidya
(Vinay Vaidya)
June 11, 2017, 12:00am
5
This is not the selector for Invoice, and the below selector will not exist in Get Text as well since its anchor based.
it should have name=“Invoice” etc selector
For element found, indicate on screen and select Invoice element. Now open the 2nd document of same template, open UiExplorer of Get Text>Cick Attach Live element and try for 3rd file now.
selrac
June 11, 2017, 6:53am
6
I managed to make it work
The problem was the selector
title='document n. *.pdf - Adobe Reader'
vs
title='document n. *.pdf - Adobe Acrobat Reader DC'
I must of been too sleepy yesterday to see it.
The important thing is that I managed to put it together and it works!!
Thanks very much for the help on this issue. I can see how how to make it work with the anchors.
Best regards,
c.
karunakart
(Karunakar T)
November 14, 2017, 11:51am
7
I’m also facing same problem, could you please elaborate on below
how did you put together.
selrac
November 15, 2017, 11:59am
8
@karunakart , the problem I had was that the selector was not correct as I’ve indicated below:
selrac:
The problem was the selector
title=‘document n. *.pdf - Adobe Reader’
vs
title=‘document n. *.pdf - Adobe Acrobat Reader DC’
karunakart
(Karunakar T)
November 15, 2017, 6:08pm
9
I have resolved this problem by using regular expression in name. Guess you might have done same. Thanks
Rabia
(Rabia)
February 6, 2018, 3:41pm
10
Hello, i need help in selectors, iam trying extract text from a pdf file , i am not getting the selector please resolve this problem
iam not getting the ANCHOR BASE get text , and variable is not creating by itself.
SHAISTA
(SHAISTA )
March 1, 2018, 7:20am
12
Hi @vvaidya
I am using anchor to read data from pdf but i get this as a output.
Its not showing the correct value as output.
Hi Shaista: I am also getting the same “1/1” or blank in message box … how did u solve your problem? Stuck!
SHAISTA
(SHAISTA )
June 2, 2018, 5:13am
14
Try using Get Full text activity and drag it in the area you want to fetch.