Iterate over each item on the web and save it

Hello everyone,

I am trying to click on each image on amazon

open it

and click add to cart

@ovi @arivu96 @MAHESH1 @balupad14

@jamnanin
If you are navigating to the same page even if you click on Apple iphone X(Silver,256GB)

Then Use DataScraping and copy both text and url

Then use Navigate to activity and pass the url. once after it opens Click on AddToCart by using Click activity.

Regards,
Mahesh

Thanks @MAHESH1 for the help.
What I did is I used the navigate to activity by looping it over the url column. But i am not able to click “Add to Cart” for some reason.

@jamnanin
what Error you are getting

Regards,
Mahesh

Main.xaml (15.6 KB)

heres my workflow…can you please explain what am i doing wrong @MAHESH1

@jamnanin

I have modified the xaml just now run and check its working fine in my system. I changed the browser to IE and modified some selectors.
Main.xaml (15.0 KB)

Regards,
Mahesh

1 Like

sure @MAHESH1 thanks for the prompt reply

Main (1) has thrown an exception

Source: Click ‘INPUT add-to-cart-butt…’

Message: Cannot find the UI element corresponding to this selector:

Exception Type: SelectorNotFoundException

UiPath.Core.SelectorNotFoundException: Cannot find the UI element corresponding to this selector: —> System.Runtime.InteropServices.COMException: Cannot find the UI element corresponding to this selector:
at UiPath.UiNodeClass.FindFirst(UiFindScope scope, String nodeID)
at UiPath.Core.UiElement.FindFirst(FindScope scope, Selector selector)
— End of inner exception stack trace —
at UiPath.Core.Activities.ScopeActivity.OnFaulted(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.Invoke(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

still getting the same error @MAHESH1

@MAHESH1 , @jamnanin

I have tested the xml in IE . It is working fine. No error.

Regards
Balamurugan.S

@balupad14 @MAHESH1

@jamnanin
Did you run the same code

Regards,
Mahesh

yes @MAHESH1

Hi @jamnanin,
After the second execution I got the error which you specified above.

This is the UiExplore result for the add cart.

I have done some changes in the code . Can you check this source.

Amazon.zip (3.4 KB)

Regards
Balamurugan.S

@balupad14

did you run the same code what u ran first time

And also the selectors are different if you observe in screen shots, i.e for the exception screen shot and uiexplorer screen shot. webcontrol id

Regards,
Mahesh

Hi @MAHESH1,

Yes the same code. Even some time in the search textbox not able to hit the enter key. I don’t know y. I have added new click element to hit the search icon.

Regards
Balamurugan.S

@balupad14 still getting the same error

Amazon has thrown an exception

Source: Click ‘INPUT add-to-cart-butt…’

Message: Cannot find the UI element corresponding to this selector:

Exception Type: SelectorNotFoundException

UiPath.Core.SelectorNotFoundException: Cannot find the UI element corresponding to this selector: —> System.Runtime.InteropServices.COMException: Cannot find the UI element corresponding to this selector:
at UiPath.UiNodeClass.FindFirst(UiFindScope scope, String nodeID)
at UiPath.Core.UiElement.FindFirst(FindScope scope, Selector selector)
— End of inner exception stack trace —
at UiPath.Core.Activities.ScopeActivity.OnFaulted(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.Invoke(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

@jamnanin
I think the screen is not navigating to the Add to cart page.

That’s why it might throwing that exception.

Regards,
Mahesh

@MAHESH1 the page loads but it still doesn’t click the “Add to Cart” button.