Getting error in iteration cannot getting UI element corresponding to the selector

Hello All,

i am using for each loop and reading value from CSV format, first iteration its working fine for second iteration its giving error. attached screen shot for your reference

1 2

@priyankamalusare Is it a Table that you are trying to Extract from the Web Page ? If so, Have you tried using Data Scraping ? Also can you show using Screenshots the Webpage and open the Selector in UiExplorer with Selector being Validated.

Hello Dear,

I am using click activity to select that option from web page . after selecting that option i am pestling value which id getting from CSV file and submitting it. for first time flow execute it and again its going to that option but that time i am getting above error as its not able to find that UI element

@priyankamalusare Can you Explain in Steps what you are Exactly performing or what you want the bot to do? Getting a Bit Confused here :sweat_smile:

Yes sure.

i have csv file with id’s , to read that i have implemented for each loop which read id from CSV file then go to the browser access the application and select option “EQU PO Global Requestor” from the web browser and input id and submit it. first time flow work correctly. when it will go in 2nd time its not able to identify "EQU PO Global Requestor" option from web browser.

@priyankamalusare Ok. What happens after Submission, Does it Come back to the Initial Page , so that it can Select that option again? Also Can you show us the Selector of the Click Activity used for that Option using a Screenshot?

it should come back to first page and select " “EQU PO Global Requestor” option.

the option is on first page itself. please check attached screen shot one is validation and second is selector editor in main thread .

it should select first option again but there only i am getting error

@priyankamalusare Then I guess what you need to do is at the end of for Each loop , you need to use Go Back activity, which transfers you back to the Previous Page. Then the execution should happen properly. Can you try this method and check?

hello Superman,

the thing is i added one condition in for each loop . if its true executing the task and for false condition its skipping the current row and moving on next row using “Continue” activity and execution started again in that scenario i am getting above error


@priyankamalusare What is Approved variable, how are you assigning it? What is the need of if condition?

After clicking on EQU PO Global Requestor option on browser using click activity . it takes me to next page where i am checking status type Approved or Not.

1)if condition is true that is status is Approved then further flow implemented .
2) if condition is false then i have use Continue activity to skip the current row and move to next row and start the execution again from start.
3)created approved as variable which data type is boolen and value is true

@priyankamalusare I don’t really know if that Continue logic is needed, Since that if condition is at the last, and only if the Condition is True it will go to the Then part where there are actions to be performed but if False, It will just execute Message Box activity, Hence no need to use Continue or are there Activities present after If Condition that you don’t want to execute if it is False?

Also what are the set of Actions in Then part?

i think However you’ll need to use Go Back Activity to go back to the page where the Option will be available, Use Go Back Activity in Then Part at the last and also in Else part before Continue Activty.

Then run the workflow, Let me know the errors that you get.

created one more thread with exact requirement can you please check that