Read status bar in web automations

Hello all .
I am using get attribute activity with “visibleInnerText” attribute to differentiate if the status bar is error or success.
Examble:

image

I am getting the following outputs.

Error Message Bar Company code 123 not defined
Company code 123 not defined

Success Message Bar Document is an accounting document (not a preliminary one)
Document is an accounting document (not a preliminary one)

My requirement is that i need Status ( Success/Error) seperately and the status message which is repeating twice in both the cases.

Something like this.

HI @dinesh.s1

Have you tried with Scrap Scrapping method to get the Success and Error message?

Regards
Gokul

1 Like

Hi.
I used Get full text activity but it gives empty value.

HI @dinesh.s1

Have you tried with Screen scrapping

image

Check out the document

1 Like

I’ll use it and confirm it to you.

Okay @dinesh.s1 , Let us know if you face any issue.

I used screen scrapping, and this are the outputs.

image

What is the Company code 123 not defined?

Do you have this text in the screen while Screen scraping? @dinesh.s1

Yes. I deliberately given wrong input just to check the status.

What do you want to archive? @dinesh.s1

Yes.
The error message is repetative.

I just want the message Error: Company code 123 not defined.

HI @dinesh.s1

After the screen scrapping Use Regex Expression

System.Text.RegularExpressions.Regex.Replace(YourString,"\S.*(?=Company code \d+ not defined)","").Tostring

image

Regards
Gokul

1 Like

Thank you.
What If I want error and the message as seperately…?

Like this:

image

HI @dinesh.s1

Just Use “Error”

System.Text.RegularExpressions.Regex.Match(YourString,"^Error").Tostring

image

Regards
Gokul

1 Like

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