Search code examples
uipathuipath-studio

Uipath data scraping error - cannot find the UI Element corresponding to this selector


I use UiPath and data scraping activity. First open the browser direct to the e-commerce site and search the product. Everything is fine, until after the product was searched and results were shown, the output gives the following error message:

Cannot find the UI Element corresponding to this selector

I deleted the data scraping activity from my project and create a new and exactly same data scraping activity again and it works without error. However, when I close the UiPath project and open it again, the error start showing again when I run it. Why does that happen?

Image of the error output


Solution

  • The obvious reason is that the selector is changing every time you visit it. So first you need to analyze your issue:

    • compare the exact error messages
    • those will differ by the refer_pv_id
    • this id is generated on every new visit obviously
    • so every time you visit the page you are getting a new one that is not matching with the old one

    To fix this you need to change your selector and using wildcards. So for your example this will be:

    ...home&refer_pv_id=*' title=...