Hello everyone,
I am trying to click on each image on amazon
open it
and click add to cart
@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.
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
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
I have tested the xml in IE . It is working fine. No error.
Regards
Balamurugan.S
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
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