9. RPA Challenge - Dynamic Selectors on Google


#1

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


How to deal with dynamic selector
Extract data from excel and populate rows in an existing open browser
#2

Could you upload the xaml?


#3

Main.xaml (14.2 KB)


#4

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


#5

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…


#6

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


#7

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,


#8

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


#9

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


#10

Man you are on fire !! :sunglasses:


Automation Challenge Winners
#11

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 …


#12

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


#13

Main.xaml (13.7 KB)

Hi
I have attached a solution here.


#14

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.


#15

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)


#16

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.