Couldn't extract the correct text from browser

Hi Manjula,

Oppsss, didn’t notice about it. Please find the aaname below.

html title=‘Supplier Risk Manager’ /
webctrl id=‘profile_prescore’ tag=‘DIV’ aaname=‘SSI 10 9 5 0 SSI Level of Insight B - Robust Prediction SER 5 9 5 1 SER Data Depth B EMMA Paydex 43 0 50 100 Failure Score (1-100) 14 0 50 100 D&B Rating 1R3 3 4 2 1 3 4 2 1 Performance Rating Scorecard RiskNot Available’ /

Hi @JacelynLok08 ,

You can do like this

assign aaname value into string variable text

text = “SSI 10 9 5 0 SSI Level of Insight B - Robust Prediction SER 5 9 5 1 SER Data Depth B EMMA Paydex 43 0 50 100 Failure Score (1-100) 14 0 50 100 D&B Rating 1R3 3 4 2 1 3 4 2 1 Performance Rating Scorecard RiskNot Available”

Now, just consider the text after SSI and before Level of Insight

getString = Split((Split(text,“Level of Insight”)(0).ToString),“SSI”)(1).ToString.Trim

It will give result like “10 9 5 0”

Now split and get the first element

getRating = getString .Split(" "c)(0)

It will give value “10”

attached the sample workflow here for your reference.
StringManipulation.xaml (5.4 KB)

Hi @JacelynLok08 ,

Is your problem solved?

Hi Manjula,

Sorry for the late reply.

One question, how to assign aaname as text in the workflow? As the sample you provided was copy the aaname and assign in. But when goes to automation i was using get text.
I have assign the getstring and so on But for the “text=aaname” how can i automate this?

Thanks.

Regards,
Jacelyn Lok

Hi @JacelynLok08 ,

If you have used “Get Text” activity then open it in Ui Explorer and select aaname and change aaname value to “" . If you didn’t change you will get error
aaname="
”. Like this your get text variable will have the value of aaname.

Now print your get text variable in message box or write line. See what you are getting.

Then you can proceed with steps i’ve given earlier.

Hi Manjula,

I have amended the aaname = ‘’’
But it shown there is error on selector as shown on below.
Does I use wrong symbol or anything that I have did it wrongly in the Ui explorer?

Thanks.

Regards,
Jacelyn Lok

aaname = “*”

" is a wildcard. Any value can accept here so you will always replace dynamic values with "

Hi Manjula,

I have amended the aaname to wild card “*”.

But the output is still the same with 4 digits as below.

Thanks.

Regards,
Jacelyn Lok

I’ve given the solution earlier. check it

Hi Manjula,

I understand. As what I mentioned previous that I am using get text activity how can i use assign the aaname into text as shown below circle?
I think this is the point that make me get the same output.

I have rename the aaname from get text into wild card. Next how to assign it as a text?

you have assigned some varibale to get text activity right? use that variable.

ex:

if your get text is assigned to a output variable “rating” then take rating in assign activity.

Hi Manjula,

Thanks for the advise. I have follow exactly what you have guide me. But the outcome still the same with 4 numbers arrange vertically.

Thanks.

Try split by new line then.

can you tell what you are getting in strReq and getRating

Hi Manjula,

The outcome for both are the same as below in the message box.

10
9
5
0

Thanks.

Change the split like below

getRating = strReq.Split(Environment.NewLine.TocharArray)(0)

image

Hi @JacelynLok08 ,

Is your problem is resolved?

This thread is continuing for many days. Please if you got the solution mark it as solution orelse tell where you have stuck.

Hi Manjula,

Apologize for the late reply. Yes it is finally working now. I am able to extract the 1st correct rating from the string. Thanks so much.
I will mark the last formula as solution.

Thansk.

Regards,
Jacelyn Lok

1 Like

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