For eg,I have 3 pages and 162 total rows.
Checked columns values and if values not met required value then screenshot should be taken. It has to check issue row present in which page & take screenshot.
for example,
Issues found for 2 rows in 1st page,5 rows in 2nd page,3 rows in 3rd page.It has to take screen shot for all these.
How to handle that?
total rows count is not same always, so sometimes it may be 1 or 2 pages or 5 pages
Please help anyone?
Hello @vnsatyasunil, try something along these lines:
- Data Source: Identify the data source where you are checking values (e.g., Excel file, web page, database).
2. Loop Through Pages: Use a loop to iterate through the pages. You can use UiPath’s “Excel Application Scope” or “Web Automation” activities to navigate between pages.
3. Check Values: Within each page, loop through the rows and check the values against your criteria. If an issue is found, flag it.
4. Take Screenshot: Use UiPath’s “Take Screenshot” activity to capture a screenshot when an issue is detected. Save the screenshots with meaningful names that indicate the page and issue.
5. Continue or Exit: After processing each page, decide whether to continue to the next page or exit the loop based on your criteria (e.g., no more pages to process).
Here’s a simplified example using UiPath activities:
- For Each page in Pages
- Navigate to the page (e.g., use a web automation activity)
- For Each row in Page
- Check values and flag issues
- If Issue Found
- Take Screenshot (use “Take Screenshot” activity)
- Save Screenshot with meaningful name
- End For Each
- Decide whether to continue or exit the loop
- End For Each
Cheers!
currently my scenario is In extracted dt total rows in web page exist. In flteredDT reuired rows to check values exist. So after checking column values from filteredDT if issue found.
Then to get row index for taking screenshot of that issue row,used
for each row in extractedDT
for each row in filteredDT
if extractedDT.rows(Index)(“Name”).tostring=filteredDT.rows(FilteredIndex)(“Name”).tostring
then getting index and clicking that row for taking screenshot.
So here the flow u said can be used after this right?
Yes, the flow can be used after you already identified the rows:
- After you’ve checked the column values in
filteredDT
and identified the rows with issues, you can proceed to use the flow mentioned earlier to capture screenshots for those specific rows. - Implement the flow inside a loop that iterates through the pages, as described earlier. However, in your case, you won’t need to navigate to web pages or filter rows; you already have the rows that need attention.
- Inside the loop, for each page or iteration, you can further loop through the rows in
filteredDT
and check if the issue row is present on that page. - If you find a matching row in
filteredDT
for the current page, use the “Take Screenshot” activity to capture the screenshot of that specific row. - Continue this process for all pages or iterations until you’ve captured screenshots for all the issue rows in
filteredDT
.
Cheers!
Hello @vnsatyasunil
- Use the “Read Range” activity to read the data source into a DataTable.
- Iterate through each page of data (assuming each page has a fixed number of rows or you can determine page boundaries):
a. Loop through the rows on the current page using a “For Each Row” activity.
b. Check specific columns for criteria using an “If” activity.
c. If criteria are not met, take a screenshot using the “Take Screenshot” activity.
d. Optionally, navigate to the next page using appropriate actions (e.g., clicking a “Next Page” button). - Repeat step 2 for all pages.
- Complete the automation, possibly by saving the screenshots or taking additional actions based on your requirements.
Thanks & Cheers!!!