Iterate over each item on the web and save it


#1

Hello everyone,

I am trying to click on each image on amazon

open it

and click add to cart


#2

@ovi @arivu96 @MAHESH1 @balupad14


#3

@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


#4

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.


#5

@jamnanin
what Error you are getting

Regards,
Mahesh


#6

Main.xaml (15.6 KB)

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


#7

@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


#8

sure @MAHESH1 thanks for the prompt reply


#9

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


#10

@MAHESH1 , @jamnanin

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

Regards
Balamurugan.S


#11


#12

@balupad14 @MAHESH1


#13

@jamnanin
Did you run the same code

Regards,
Mahesh


#14

yes @MAHESH1


#15

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


#16

@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


#17

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


#18

@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)


#19

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

That’s why it might throwing that exception.

Regards,
Mahesh


#20

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