9. RPA Challenge - Dynamic Selectors on Google

I have to extract CEO name of different Multinational Companies from google.
I took Open Browser Activity with “www.google.com” URL name.
then Type Into with Companies Name like Mphasis,Infosys,Google,Dell,Hp,Lenovo etc
get text activity to extract the Value.

For the first run, I gave “Mphasis ceo” In Type Into activity.
In the second run, “Infosys ceo” was given in Type Into activity.
In third run, I am giving “Google ceo” in Type Into activity.
and so on.

Now get text activity is giving error regarding selectors.
I m not able to make it Dynamic

Any help will be appreciated.
Thanks in Advance

Could you upload the xaml?

Main.xaml (14.2 KB)

This is very nice for a automation challenge as the selectors look really dynamic :slight_smile:

2 Likes

Hi Badita Do u suggest any logic to find the selectors for this problem… I hv been trying from 2 hours to get the solution…
So can u help me…

Nope, I’m during Windows reinstall. :slight_smile:

Hello!

Here’s my solution for this problem.

RPA_Challenge9_LucasPimenta.xaml (10.6 KB)

I have used the “Get attribute Activity” to get the name corresponding to the ‘div selector’. So It works whatever the name is.

PS * Works just in case of the name appears like the Badita’s image above.

Let me know if doesn’t work or if you have doubts.

Hope It Helps!

Regards,

9 Likes

Nothing Much change needed. you can use the property in selectors “css-selector” and pass it the class of that div :slight_smile:

and in other options like @Lucas.Pimenta did is to get the element property name with “aaname” attribute.

For Just a reference i am attaching a sample workflow, Look into it as well :slight_smile:

SelectorSample.zip (6.5 KB)

Regards…!!
Aksh

3 Likes

Hi,RPA_Challenge9_Ashish.zip (8.9 KB)

Please find attached my resolution to the problem.

In my case I have not close google but surfing on the same page.

Regards,
Ashish

3 Likes

Man you are on fire !! :sunglasses:

1 Like

Just for the reference - i solved the problem using the straight forward “class” attribute of the html element (which seems to be unique). I cannot upload files though …

4 Likes

Glad to know :slight_smile: @theo500

I was mentioned that in uipath it will identify a dom element class using “css-selector” attribute. :slight_smile:

Regards…!!
Aksh

Main.xaml (13.7 KB)

Hi
I have attached a solution here.

Hi!

I come up with a solution. Maybe helps someone :+1:

Write the company’s names on excel and get CEO’s names in the same file.

Dynamic Selectors on Google.zip (25.1 KB)

Excel file must be in "C:", but if not exist, it will be created automatly.

What do you think about?

Greetings.

I know there are already a lot of answers to this one but I’m putting mine in anyway thanks,

Chall9_DynamicSelectorsGoogle.zip (22.2 KB)

1 Like

Actually my solution may not be the best. Works for Apple and Google but not Microsoft where the page format is slightly different and the CEO name is not displayed in the same way.

Hi Aksh,

I went through your work flow… your get full activity selector is

image

But when i tried i’m not getting these attributes. So could you please let me know from where you got these selector.

Thank you

Hey @Praba_Karan

UiExlporer :slight_smile: or do not remember may be from webpage DOM :slight_smile:

UiExplorer is best :slight_smile:

Regards…!!
Aksh

1 Like

Ya i checked in Both webpage DOM and uiexplorer but i couldn’t get the correct selector as you got.

Lets take a example. Both is the webpage DOM image.

.

Below is the ui explorer selector

Just want to figure out where i’m going wrong.

My solution using chrome here.Main.xaml (11.0 KB)