Ui Selector is validated, but when the robot runs, I get an error that the selector is not valid

Hi,

This post is related to my post where I asked how to use the find children activity to click on all instances of the same button on a web page.

I’m working on the starting logic for another health carrier website to scrape plans, but I run into an error where the selector I’ve indicated is deemed invalid during run time. The confusing thing is I have validated the selector within the script prior to testing.

Here is what I have so far:

Main.xaml (23.9 KB)

I’ve tried all the combinations of selectors that I could validate. This included css selectors, ids, tags, etc. While I can validate them in the script, they always fail during run time.

I’ve been able to apply this logic to 3 different carrier websites, but Aetna’s website fails to run. Any suggestions would be greatly appreciated!

Thank you

1 Like

Hey @cho_cho

Could you please show us the screenshot of the UI Element and the selector ?

Thanks
#nK

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.

Here’s a screen of the Uielement I’m attempting to find descendants within:

1 Like

Hey @cho_cho

Thanks for the explanation.

Could you please highlight the element on the screen once please - the parent & one of the child.

Thanks
#nK

UiElement_LI (2)

The way I understand it, the parent div is the container they store each of the available plans within, and within each of those plan containers, they have a button that takes you to that specific plan. I need the robot to see how many containers exist with plans, then track how many buttons with “plan details” exists so it can iteratively click each plan, where I can invoke an activity to scrape plan data.

1 Like

Hey @cho_cho

Okay got it.

I recommend you to reduce your parent scope a bit to the exact container of the children.

And in the selector you use for the parent is not reliable. So could you please indicate that element in Ui-Explorer and share the selector screenshot to check and make it reliable.

Thanks
#nK

I haven’t been able to indicate the parent scope to the exact container that has the plans. I can locate the div by inspecting, but not sure how to use that information to change the selectors to match. For whatever the reason, when indicating with UIpath, it is unable to locate that container for selection.

Here’s a screen of the container I’m speaking of:

I’ll try and get to this div within Ui Explorer now, but haven’t had luck in past tries.

1 Like

Hey @cho_cho

You will need to use Visual Tree from Ui-Explorer to get that container as target.

Hope this helps.

Thanks
#nK

I’ve tried that and it still doesnt work.

1 Like

Hey @cho_cho

We aren’t done yet. Now kindly update the selector - remove the css selector please.

!! Keep only parent id and tag !!. Validate & Highlight to confirm if the selector is reliable.

Thanks
#nK

It still fails when the selector is just the parent id and tag. It also creates an idx value, which is similar to my other scripts so I thought it would work. :confused:

Btw it is validated, and it highlights the expected div on the page.

1 Like