Anchor Base Not Getting Desired Text

Hi.

I am trying to extract the “Ended Not OK” status text below:

I tried using an Anchor Base Activity like so:

However, when I run the activity and try to log the output I get 10/10/2019 8:00:16 AM. I don’t understand where this output is coming from as the two fields below the Status have different time stamps. Furthermore, I cannot figure out how to extract the “Ended Not OK” text.

In the UiExplorer Tree this is the only part of the tree that contains the desired text

I have tried trying to make the Ended Not OK text unique by including all possible combinations of the child scroll bar attributes, but then the result of the activity will return 0.

Another issue is that all of these field’s selectors are using their actual text name as identifiers

<wnd app='emwa.exe' cls='HwndWrapper*' title=' - [User: TESTFC, Environment: Default Naming Service, Server: c*' />
<ctrl automationid='PropertiesTabItem' />
<ctrl name='Status:' role='text' />
<wnd app='emwa.exe' cls='HwndWrapper*' title=' - [User: TESTFC, Environment: Default Naming Service, Server: c*' />
<ctrl automationid='PropertiesTabItem' />
<ctrl name='Ended Not OK' role='text' />

etc.

If I try modifying the selector to name='*' I get returned Synopis and not what I want.

I am confused on what to try next. Any ideas will be appreciated.

Kindly try with title value as * like title =‘*’
and then try once
Cheers @rmckinnon

@Palaniyappan Did not change any behavior.

OK. For anyone who visits this post in the future, while it may not help you this is how I ended up solving my specific problem.

No matter what I did I could not get the anchor to read the Ended Not OK text, and it was very un-intuitive why this was the case. My selector always highlighted the Ended Not OK, if i did a Get Text activity and specifically looked for “ended not ok” i could find it as well. However, I suspect it has to do with all the corresponding text fields having the same text attribute that made it hard to distinguish the field, though I still don’t understand why it returned what it did.

My workaround was to get an OCR Text Activity and select the area that the pane was in (see highlighted box)

This OCR text then returned that pane’s info:

"Run Information\r\nOrder ID: 09b5i\r\nStatus: Ended Not 0K\r\nOrder Date: 10/15/2019\r\nStarted At: 10/15/2019 7:45:34 AM\r\nEnded At: 10/15/2019 7:45:35 AM\r\nNumber of Runs: 1"

Now I at least have a String that contains the status needed. All that’s left is to extract that text but in a dynamic way as my Status will change.

I created a new String array that would hold the string separated by the colons

(Assign Statement)
test = s_job_status.Split(":"c)

Then I found that the second index of this test array contained

Ended Not 0K
Order Date

Lucky for me, I was able to just split at the new line and get my status result, and of course I want the half of this split so:

(Assign)
status = test(2).Split(CChar(vblf))(0)

And then I finally got my String… but the OCR reads Ended Not 0K instead of Ended Not OK but at this point I just am going to live with that.

Good luck to anyone who has weird problems like this.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.