I’m trying to extract company information from a google maps search. However, the only element I can select is the entire listing instead of individual pieces of the listing. I’m not certain how to adjust my settings to fix this.
I’ve also attempted to click into each listing as once inside I can indicate and extract each element but I’m having difficulties with UI Path actually clicking each listing.
In my various clicks and get text activities I have something similar to the following to select the appropriate element on screen.
Any idea of why this isn’t working?
Hello and welcome! Quick question to start, if you haven’t already, if you tap f4 (change the UiFramework) when you are using the indicate element on screen for this activity, does that help to change what you can select there? There are a few different frameworks, so you may want to tap f4 a few times and check.
Aside from that, it may be worth having a look at your selectors to see if you can make the click activity more stable. If you’d like to paste a screenshot of your UiExplorer for this, I’d be glad to look at what could be used.
Hi BeeZee, Didn’t know about F4 but that did the trick for accessing the individual elements. Now I’m trying to access the company name of each listing using my while loop and listingIndex variable. I know I need to use listingIndex in my selector after manipulating it to get the idx element to appear, but something still isn’t right.
You should be using Data Scraping, not building it manually.
I’m familiar with the data scraping wizard. This is part of an exercise where I am tasked to not use the wizard and to try this method instead.
I have tried scraping from Google Maps before. The selectors were never consistent enough to work consistently.
I instead opted for using the Google Maps API, which was much faster and more reliable. I encourage you to investigate that instead
Would it be possible to get you to open that selector in UiExplorer and take a screenshot of that? I’m hoping UiExplorer shows a few more options on this as idx is often unstable.
Is the end goal of this to scrape addresses for each listing? I’m just trying to think through what might be able to be used for this.
I’m supposed to try and get the company name and phone number.
Is this for a specific company(ies)? Or for each company in the maps list?
I’m tellin ya, I’ve tried doing basically this same exercise. Google does a great job preventing you from easily automating via the HTML. It’s a lost cause. The API is super easy and significantly faster.
Which is why they want you to use it instead of scraping the UI. It’s easier on their systems.
Each company in the list for a given city/region