Check record in web page

Hi all,

I have a case, I have read row in excel then query in webpage and if it exist will update it
otherwise I have to display message ’ The row doesn’t exist’…

I have complete the reading from excel and query, how can I check if the record is there or not… thanks in advanced and your help will be appreciated…

@Hanan_Saad

You can use get text activity to extract the text from the uielement. then check whether it is equal to your excel row text or not.

1 Like

Hello @Hanan_Saad,

Hope this could help you. You have to explore what happens when you query in the webpage :

when the record exists: as @ksrinu070184 suggested check which elements in the webpage could you used to identify the element.

When the record does not exist: check if an information message raises saying no records meet your search criteria .

Best Regards,
Susana

1 Like

Thank you all, I will try and check…

But one more thing… do you know how will read data excel if its coming like this…
I need to take 1 then 2 then 3 as below :frowning:

get datatable I iterate with for each, but I am confused with below format,
appreciate your help!!!

Hi @Hanan_Saad,

It seems that this excel file always have the same number of rows. Is it right? If this is the case, then you can read each cell independently

Best Regards,
Susana

columns yes but rows maybe will be different,
and there are 3 cells have merged, how can I reach to row number 7?

row(7).ToString , doesn’t work for me…
I am confused how the rows will be increment…

Hi @Hanan_Saad,

There is an empty row between “Handset Installment” and “Nokia”. Maybe you can search the index of this empty row and then the following row is your search row for data 1 and 3.
You can try something like

DataRow rows = datatable.AsEnumerable.Where(Function (row) String.IsNullOrEmpty(row(0).ToString) ).ToArray

Integer lastIndex = datatable.Rows.IndexOf(rows(0))

The values 1 and 3 should be in the row with index lastIndex+1.

Maybe it could be useful if you can share your file :slight_smile:

Best Regards,
Susana

Thanks @Susana , I am trying to do that…
and find below my file

Hi @Hanan_Saad,

Please, try this ReadExcel_92554.xaml (9.3 KB)
and let me know :slight_smile:
The text for the “empty” row is “Upfront Charge”.

Best Regards,
Susana

Thanks @Susana , really appreciate your help…
I will do it and let you know the result <3

1 Like

Hi @Susana , its working fine to extract 1 & 3 :slight_smile:

But how get 2 ? Should I take 12 in first iterate with Nokia, second iterate should get 14 with Nokia, third will be 24 with Nokia,I tried with ( contract = row(Counter).ToString) , then increment counter…

This is right? I’m not sure I’m not comfortable with this way…
can you help

Hi @Hanan_Saad,

If I have understood you well, you have to get the columns values for the Contract Duration (Months) column so you can do it as you commented, using the column index or you can access directly the cell usign the read cell activity.
ReadExcel_92554.xaml (12.5 KB)

Best Regards,
Susana

1 Like