2

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

kwoxer
  • 3,734
  • 4
  • 40
  • 70
WetzelSchultz
  • 67
  • 1
  • 10
  • If the answer solved your issue, do not forget to upvote it. Thanks. – kwoxer May 03 '20 at 13:02
  • 1
    Thank you for your help. I am sorry, my stackoverflow reputation is less than 15, therefore it is unable to publicly display the upvote. – WetzelSchultz May 03 '20 at 13:09
  • I see. Maybe come back in some month when you have more. Also make sure to check out the UiPath Academy. This is free and you learn things like I taught you here. Things like handling the selector are some basics you need to know. Wish you all the best with your project. – kwoxer May 03 '20 at 13:13
  • Sure, no problem. Thank you kwoxer! – WetzelSchultz May 04 '20 at 07:05

1 Answers1

2

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=...

kwoxer
  • 3,734
  • 4
  • 40
  • 70