Not able to find the static selector for the Google Sheet page

selector
uiautomation
studio

#1

Hi,

I want to download the google sheet, by performing web recording. I am using the following steps in web recording to download the sheet as .xlsx

  1. Using Element-> Mouse-> Click option, to click on the ‘File’ menu
  2. Element-> Mouse-> Hover option, to hover on the ‘Download As’
  3. Element-> Mouse-> Hover option, to hover on the ‘Microsoft Excel (.xlsx)’
  4. Element-> Mouse-> Click option, to click on the ‘Microsoft Excel (.xlsx)’
    Has my approach been proper?

Since I am new to this, someone please tell me how to resolve this issue. I have attached the UI explorer screenshot. Here the parent id keeps changing so I removed it, and tried to use the other available static attributes. Even using the static attribute(like cls name) doesn’t help. In that I have tried using all the attributes, but didn’t help.


#2

Hello @Namratha_Nayak,

Where exactly is the process failing? in which step?


#3

@Rishabh_Lakhera, It is failing in the 3rd and 4th step… Web recording shows same selector in 3rd and 4th option. I think because it’s same element. And action like click and hover nothing to do with selectors, it refers only to the element…


#4

Can i have the xaml file so to test?


#5

Main.xaml (12.3 KB)

I have uploaded the sample xaml file.


#6

@Namratha_Nayaky

I don’t have access to the spreadsheet hence couldn’t test it.
But i can see that the last hover activity and the click following it have the same selector.
Try using the UiExplorer to make the selectors unique and reliable for both of them. Try adding some tags that are different for both of them.


#7

@Rishabh_Lakhera. I have changed the access, could you please check now?

Yeah, it has the same selector because both actions I am performing on the same UI element.

  1. Click on File menu
  2. Hover on the Download As
  3. Hover on Microsoft Excel
  4. Click on Microsoft Excel

#8

Main (15).xaml (12.9 KB)


#9

Check out this workflow, i tweaked the selectors please check them out!
Also, i removed the attach browser activity as it was redundant, you do not need attach browser if you’re using the activities inside the open browser itself!

Main.xaml (9.5 KB)


#10

@Rishabh_Lakhera,

I was getting error into that xaml file. Made some more tweaks. Working fine now.
Thank you very much for the help.

I have got one question. In which case ''Attach browser" activity would be useful. Because when we use the web recording, it automatically inserts the click events inside the ''Attach browser" activity.


#11

@shruti, Still getting the error in that workflow. By looking into @Rishabh_Lakhera and yours .xaml file, have done some tweaks and it is working now.

Thanks a lot for the quick response.


#12

If you are not opening the browser,that is, you already have it opened and then you want to perform some actions, in that case you have two options -

1.You use full selectors
2.You use a attach browser activity and then inside that put the other activities

It won’t make a difference if you have a attach browser inside an open browser, but you dont need it there so i removed it :slight_smile:

If while recording you begin with “open browser” first and then perform the rest of the actions, then you’ll notice that it doesn’t place them inside the attach browser!
You must have manually put the open browser activity and then use the recording to perform the clicks, hence it put a attach browser automatically!

I hope i’m clear :slight_smile:

Regards.


#13

Thanks for the info @Rishabh_Lakhera.