First of all, I apologize for my English, as I understand it very little and I have to rely on Google Translate, which has its limitations.
Does anyone know if there is a way in the selector to distinguish between windows and tabs? Alternatively, is there a way to ensure that a specific sequence is executed continuously within a “for each parallel” loop, without jumping to another parallel branch until that sequence is completed?
Let me explain: I have a process that reads data from an Excel file and stores it in a DataTable. Then, using that data, it accesses a website and, for each row in the DataTable, it enters the data, opens a new tab, and downloads a PDF with a variable name. The process takes about 20 seconds per line. Recently, the maximum number of lines in the Excel file has increased from around 100 to 6000, which has increased the execution time from less than 1 hour to 36 hours.
Therefore, we have decided to parallelize the process and we want to do it with a variable number of parallel branches (with 5 or 6 parallel branches, we hope to reduce the time to around 6 or 7 hours, which is more manageable, although it will depend on the number of lines). To achieve this, we want to use a “for each parallel” loop.
The problem arises when the pdf tab needs to be closed once the document is downloaded, and it always has the same name and URL (just like the original window before entering the data). We distinguish each window using the index in the selector. However, when the data is entered, the title automatically changes, so we have to remove the title from the selector and replace it with an asterisk, because otherwise the indices keep resetting based on the number of windows remaining with that title, instead of specifying which window or tab it is.
Similarly, we could refer to that second tab of each window using the number of tabs plus the number of windows, assuming both are always open. However, being a “for each parallel” loop, we don’t know the number of second tabs that are open at any given time.
I have tried several things, but either it confuses the window or the tab, especially with the indices, or activities like “get active window” also cause confusion. Sometimes another tab opens between the “use application/browser” activity and the start of the “get active window” activity, causing confusion…
I’m not sure if I have explained the problem well or not, I hope I have.
So, is there any immutable or distinct identifier for tabs and/or windows? Or is there any way to force the download and tab closure to happen continuously without jumping to other parallel branches?
Any ideas will be welcome. Thank you very much!