UiExplorer - "The changes made the selector invalid"

Hi all,

Since updating to UiPath 2017 I’ve been having this issue - whenever I try to change a selector using UiExplorer I get the following popup:

“The changes made the selector invalid”

And the value of the selector in the text window doesn’t update. Even if I put it back to it’s original state I get this popup error. I am using Chrome Browser. When I try to use IE, I can’t even select the element (I get “the UiElement is no longer valid”)

It’s probably pilot error, but I’m wondering if anyone else is having this problem?

Sample case: Open browser at “www.daft.ie” and try to use “click text OCR” on the header bar with “For Sale, To Rent, Sharing, Commercial, More”, then to update the selector via UiPath.

I am also getting same error
@pduffy.Did you get the solution to this error.

@pduffy hey I’m with you. I was using raw code to interact with web prior to UiPath and in some ways it performed better, but after time I found UiPath provided a more maintainable platform to perform these interactions and works well. However, saying this, I have found that java sites will sometimes cause issues.

I would wonder if the issues you have had are isolated to only that one website. There’s usually a way to interact though even if you Inject javascript to the element controls.

Also, some sites, you need to change the WaitForReady to “None” or it delays the actions.

If you provide any details or screenshots of what you are working with, maybe someone can provide better help.

In short, could just be the website doesn’t work well with RPA… yet. I used to call UiPath, “UiWorkaround” :rofl:

Let us know if there is anything we can help with though.

Regards.

Lol UiWorkaround. Here’s a random example where I would hit a problem:

Visit “udemy.com” and search for “bitcoin” (just examples)

Try to do a data scrape. Specifying the “next page” button will give a long path down the html which is just a ul>. The problem is, on page 1 the corresponding li> for next button could be 5 rows down the list, but by the time you reach page 6 that could actually 7 levels, so instead of going to next page 7 it will go to the last page 27. Changing the selector is not trivial since it uses such generic tags. On top of that, exporting the csv even with just these pages will only write out the contents of the last page to the file, I don’t know why.

Some attempted workarounds:

1: Try to scrape the total number of pages from the menu so I can use a recursive loop and append to file. Not working because it won’t scrape the menu numbers consistently (weird errors)

2: Find the ‘next’ button UiElement and use ‘click’ to select it. This works. So try to assign this variable to the data scraping wizard for clicking through pages - can’t do it, it only seems to support using a selector path.

3: Pull the entire menu object into an iEnumerable and work through those pages. Was a long shot and didn’t work either.

I can probably use workaround 2 and scrape one page at a time, appending to the file each time. But I’ll bet I’m gonna hit more problems along the way.

I hope these explanations make sense it’s a bit rushed…

1 Like

This had me interested, so I checked it out, and yeah this site definitely makes things a little tricky. It’s more to do with how the selectors are than how UiPath is though (however, UiPath doesn’t always generate the best selector initially).

What I found is that the Next button changes the idx attribute after about 5 pages. So I needed to adjust the selector to include the class attribute which has “next” in the name and make sure idx was not in the selector. This was the main reason for it stopping.

The other reason was that the delay needed to be increased (I changed it to 2000) just cause of slower load times. Also, number of items need to be increased if more than 100, etc.

Lastly, this site requires that you change the WaitForReady to “None”

Here is the scraping activity in a workflow so you can see it.
udemytest.xaml (11.4 KB)

I will also add that the Data Scraping doesn’t always work that well, but in this case it did seem to work and extracted all 27 pages. It didn’t organize it that well, but all the data was there.

Hope that helps in some way, but understand there are some annoyances like this while designing. I do agree, that this push that “all associates will have their own robot” is a little ambitious, but I also think everyone can learn how to design these things even if it requires technical experience.

Regards.

3 Likes

Thanks ClaytonM. I actually went a different route and extracted the next button by scraping the menu as an array and assigning it to the last element. Then put the whole thing in a page by page loop reading and writing data. I had already increased delay for that site, anyway it was just an example site I’ve had these kinds of problems scraping web data in general.