Thank you for your response the process I am following is
I am using For Each Row (to iterate accounts)
I am entering account number (type into)
I am doing element exist (in the home page)
I am doing Get Full Text (to capture the entire content). Here I am creating an output variable ( write1)
I am clicking on next ( to go to the next screen)
I am suppose to do Get Full Text if there are entries (I will be creating an output variable again i.e write2)
If the second screen is blank then I will click on exit ( and start again with second account)
After completing the first account I am suppose to write the entries fetched by doing Get Full Text. So I am doing (write1+write2)
But when I am trying to do the same for the second account my flow is not working (as it is not getting exit) because my flow is expecting to do Get Full Text two times but, unfortunately the second account does not have second page. So instead of clicking to exit it is throwing error UI does not exist
@dipon1112000 On Step 5, where you are clicking Next → First check Element Exists (Next Button) → If Next Button Exists : Click on Next and then perform the next step. → Else: Click on exit.
Thank you for helping but might not have understood the problem.
The first challenge is to iterate get full text activity
I.e if an account has 3 screens then the bot should do 3 get full text and add the result of all get full text into output after that it is suppose to do the same on another account.
As suggested I have done element exist on next but
I don’t know how to iterate get full text and get all the output. (I have tried by adding the output variable of each get full text activity)
While iterating on second account the above condition may or may not be applicable as the second account may have more or less screens and as I have declared 3 get full text activity in my flow for the first account the work flow will stop as the second account my not have 3 pages
So if you can advise how do get full text iteration along with capturing the content for each get full text it will be great
@dipon1112000 To get all of the variables of getfull text, you can have following consideration:
Add a variable outside of loop, an keep appending the data to that variable.
Variable → FinalResult -->String -->Scope(Before the For Each Row)
Inside Loop → Get Full Text → FinalResult = FinalResult+Environment.NewLine+Write1
If Next Button → Click Next
Else–> Click Exit
You can also have datatable to store all write1 and then doing the same thing at above, you can use OutputDataTable Activity to get all data in string and write it down.
Allow me some time to check if I can send you dummy flow.
After creating each Variable to each Get Full text then create a variable called List_Items which is in List of String common for all Get text activities.
For example -
For first page the variable is Var1, for second page the variable is Var2, for third page the variable is Var3
After first Get Full text activity use the Add Item to collection activity to add the Var1 to List_Items variable.
After Second Get Full text activity use the Add Item to collection activity to add the Var2 to List_Items variable.
Do the same for how many get text you have,
After all use Get text done,
-> Output = String.Join(", "List_Items)
' Output is the String datatype variable
Write the output variable to the text file by using write text file activity.
Thank you but the challenge is that I will not know how many get full text are going to be there in an account as I am dealing with multiple accounts (so it will not be possible to allocate output variable for each of the account right)
Suppose account 1 has requirement of 10 get full text, account 2 has 3 get full text, account3 has 5 and so on