I’m working on a script that will scrape health plan data from carrier websites. I need to simulate the actions that a human would take by inputting a zipcode, selecting a plan type, then navigating the menus to show all available plans in a given zipcode.
Once I get to this page with all available plans, there will always be x number of plans. So I need the robot to determine how many instances of the button labeled “Plan details” (or some other phrase) exists on the page, and then iteratively click on each button, so that it can scrape from each plan, then return back to the page with all available plans to continue scraping the remaining plans.
I’ve been googling and trying to make sense of some of the forum posts, but I’m not sure how to use the Find Children activity in order to find all instances of the same type of button to iterate through. Can someone please help? I’ll attach what I have created thus far. When I reach the find children activity, nothing is added to my IEnumerable object to loop through in the debugger, so I’m getting something wrong with the selectors.
This only works for the first click, on the next iteration, it runs into this error: “Click: Cannot send input to UI element because it is outside of screen bounds.”
Does this mean that the robot needs to see each of the buttons on the screen in order to click it?
Also could you explain the difference between descendants and children in this case?
In this case, as there is no page in which FindChildren got elements, the element is no longer valid.
So we need to re-take element as the following, for example.
That works! I don’t fully understand it, so correct me if I’m wrong.
Are you creating index values based on how many indices are in the initial ienumerable object?
When you retake the element, you’re then creating another ienumerable object to loop through, and setting the index to the current loop of the first ienumerable?
Then by setting the focus on the exact button at given iteration, the robot knows which button to click on?
Do you think you can help me understand why I can’t get selectors to work during runtime in this process? I validate the selectors with Ui Explorer in Studio, but when I test, no combination of validated selectors works. I get invalid selector errors. Main.xaml (23.8 KB)
Here’s a screen with the filter and selector I’m currently using. The first find children activity fails even though I validate the selectors before running. I don’t understand why. I have not been able to find a combination of valid selectors that work during run time when I debug the process.