Need to clarify in fine element varaible

Hai,
I need to understand one concept in fine element activity

  1. In find element activity if I want to click some thing but that ui element is not at all found. Then what is the output of find element activity???

  2. In try catch block when will final state will be executed???

  3. What is the output of excel application scope???
    Ans: workbook application my answer if anything there means please tell me I will correct

  4. In excel sheet I have 10 rows I need to filter alternate rows to next data table like 1st row,3rd row, 5th row this kind need
    How it will be achieve???

Thank you,
Sivasankar.

Hi,

sharing my thoughts on your questions. thanks.

  1. In find element activity if I want to click some thing but that ui element is not at all found. Then what is the output of find element activity???

→ if find element activity not able to find any object it will throw time out error. but we can enable to continue on error true so we wont get any time out errors. another work around should be keep the find element in the try catch block to get the exception in the catch block.

  1. In try catch block when will final state will be executed???

i assume you are talking about finally block. if we have exception in the try block it will go to catch block after executing the catch block it will go to finally block.
if we dont have any exception in the try block it will go directly to finally block.

What is the output of excel application scope???
Ans: workbook application my answer if anything there means please tell me I will correct.

→ you are correct

last question i did not get much clarity could you please elaborate. thanks.

1 Like

Hi there, as kirankumar.mahanthi1 already answered first 3 questions I’ll only address the last issue.
As far as i’m concerned there is no straightforward solution. Using only UiPath activities I would create two tables “dtEvenRows” and “dtUnevenRows” using in_dtOriginalTable.clone and then inside “For Each Row” activity i would add original table rows to even or uneven table.

In excel sheet I have 10 rows I need to filter that data table like alternate rows I need to filter and save to another data table

Like 1st row and 3rd row 5th row, 7th row and 9th row only In another data table
How can I achieve this

One mistake - CurrentRowIndex starts from 0, so the IF clause should be:
(currentRowIndex +1) MOD 2 = 0

1 Like

@siva_sankar

Check below for your reference

Hope this will help you

Thanks

Thank you

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.