How to extract values from a drop down menu

I am doing some statistical research on crime in Australia and i would like to extract the names of the the suburbs of the website below so i can loop through each name and then extract the statistics. Please offer some suggestions ?

Please scroll down half way and click on the Suburb tab and then you will see the field “Please Enter Suburb”

Hey, @CC08

from what I’ve seen in the website provided, the suburbs aren’t available unless you start typing (the output is dynamic), am I correct? In that case I’m not quite sure if there’s a way to extract that data directly, I event tried checking the HTML code for a possible reference to the list.
Do you have to get the suburbs list specifically from that field?

Happy Automation :robot:
Hugo Varela

Hi hugo_verela, I have also tried the same thing with the HTML code. I’m now working on an excel vba script for permutations for every 3 letter combination and will then try this as an input then i should be able to use this. Thanks for your help, much appreciated.


I don’t think that’s the best solution considering scalability, but I think it’s a good way to get a solution!
I also looked around the website and found this: Your Local Police | Western Australia Police Force > I don’t know if the suburbs are all listed there, but it might be something!

Good luck in your work.
Happy Automation :robot:
Hugo Varela

To be complete you will need a list of suburbs to enter, like this one:

Actually it seems not for any suburb there is a dataset in the police website?

If I were to implement this, I would go with @moenk suggestion.

  1. Firstly, scrape the suburb list from Wikipedia
  2. While looping through the list, type into the suburb name into the search field
  3. Check for returned data (you can use ElementExists or CheckAppState to check if certain data tables existence)
  4. If any data was returned, scrape the table data.

We have just enhanced the TableExtraction wizard for UIAutomation Modern view. I suggest you to try UIAutomation.Activities 21.2-preview and let us know how it worked.


Some of the suggestions above are meaningful, but in this case you could just go against the site’s API and return all the data using the link below.

1 Like