The best way for scraping

Hi,

I got wired question.Which way of extracting data in this case will be the best:
1scraping
I need elements at: ClientID, Client Name and Client Country…

1 Like

You can use an ‘Anchor Base’ activity under which ‘Find Element’ can be used to identify the element labels and then ‘Get Text’/‘Get OCR Text’ to identify the value next to that element as long as they have the same structure.

Thanks,
Rammohan B.

2 Likes

HI @fudi5,

use screen scraping (OCR) to get the text to strvalue

After getting the value using split Environment.NewLine option spit the value to array
For loop through the array value you can get the each value.

arrvalue= strvalue.Split(Environment.NewLine.ToArray, StringSplitOptions.RemoveEmptyEntries)

arrvalue(0).ToString.Split(":"c)(0) ->Client ID
arrvalue(0).ToString.Split(":"c)(1) ->KI44163

arrvalue(1).ToString.Split(":"c)(0) ->Client Name
arrvalue(1).ToString.Split(":"c)(1) -> Edison Byam

arrvalue(2).ToString.Split(":"c)(0) ->Client Country
arrvalue(3).ToString.Split(":"c)(1) -> Germany

Refer this post to store the value in Dictionary and can use from dictionary

Regards,
Arivu :slight_smile:

3 Likes

Hiii :slight_smile: Arivu96,

Again i can receive help form You. I thing you’re quite amazing hehe :).
Back to the main subject. I got one problem…
Always after scraping i got default value GenericValue… and i can not change it for strvalue… i can be in this case array of strings… or what i missing too?

Hi @fudi5,

Yes once scarp you will get generic value only.

You can change it into string variable also.

Else you cane use genericvalue.ToString()

Regards,
Arivu

1 Like

OK i have beed done with it. Can you tell me what to do in next case…
Im on the last sequence where it updating data… clicking button “Update Work Item”
And then i need to update comment and status… my sequence get problem with redirecting steps on the new upcoming windows.

What i can do in this case…
As always many thanks for help

Hey @arivu96,

I am trying to split the string values as you mentioned above, however when i pass those to the key & value properties of ‘Add to Dictionary’ activity it throws me an error as below. What am i missing here?, would be glad if you can help.

Thanks,
Rammohan B.

Hi @Rammohan91,

use c after double quotes
arrvalue(0).ToString.Split(":"c)

Regards,
Arivu

1 Like

Great @arivu96, Thank you so much. It worked. Looks like have to focus more on vb.net concepts as well :slight_smile:

Thanks,
Rammohan B.

1 Like

Yes @Rammohan91 uipath will support vb.net,c# but mostly vb.net is flexible to use

Regards,
Arivu

1 Like

Hi can you share the screen scraping ork flow… Please

Hi Ram , I am just curious . when you posted this statement , it looks like you didn’t have much knowledge of vb.net. But you still got an award :heart_eyes::heart_eyes: Kudos to you !!!

Question → now, have you learnt vb.net to manage these scenarios ( String manipulation ) if so, from where and what did you do to overcome this obstacle. did you have any knowledge of OOPS concepts before.

Reason I am asking is because I don’t have any vb.net knowledge and am trying to find a solution to overcome this shortcoming

Ha Ha. Thank You so much @dennis . Truly speaking i still don’t know VB.Net(I won’t even call myself a beginner in VB :wink: ). However i can manage things with C#.Net and it helps a lot. That’s the reason i stay away from Invoke Code activities which specially uses VB :wink: . Considering the other areas like declaring & assigning the values, i feel its much similar to C#.Net and just a google for the format when needed makes it works for me. If still i see something that i can’t achieve in UiPath where i had to use VB.Net, i may better go and create a custom activity in c# to manage :slight_smile:

And ya, I have been planning to VB.Net but not getting enough time for it. May be i ll get it done when i come to a situation where i don’t have an option than to use VB.Net :stuck_out_tongue_winking_eye:

Thanks,
Rammohan B.