I am facing an issue at the time of picking the correct value of the Date from the calender. When the same value of the Date is visible in the same page , bot is selecting always the 1st row of the Date not the current month latest date which is the exact one and bot needs to select the latest date value of the current month.
For example here in this screen shot Date value = 26 th is visible two times in the same page for March and other one is for feb but it is blur mode but Click activity is executing always on the 1st row date that us 26th Feb not on the 26th march which is the current latest exact date. How to resolve this ? Please help.
No selector difference, actually not able to get the solution anyhow. Could u please try this one? Type into is not possible here actually need to pick the number from availble window. Any other way please.
Hi @Ritesh_Burman - Sounds like you’ve to write a logic to make the bot start looking from last row. Can you try the below one
Take click activity, indicate the value in the last row, it gives the selector with table row and column. Make sure your selector has table row value (say tablerow = 7), aaname that has the respective date
Take while loop with condition as 7<=1 (assume)
within that, keep the above click activity enclosed in a try catch block
Also, pass the variable(say initialize with 7) for tablerow attribute in your selector and pass the variable for aaname attribute that has date to select
How Logic Works
First, it starts with last row and search for the respective date. if it does not find it throws an exception. Anyway, you’ll have try catch block to handle this
Once it comes out of try catch decrement the table row value to 6
Now, it goes top and searches for the respective date in the 6th row, if it finds, it simply select and will not throw any exception, then you can break from that loop,else the loop repeats until first row
No not from the last row always, if u follow my screenshot there 26 March is visible two times but i need to select the 26th of the March but bot is taking the 1st row of 26th which is the date of Feb that is wrong selection actually that I need to avaoid. Could u please help on this? Bot runs everyweek and it seelcts the date accordingly so if in any case if two same values of date is comming on same page window bot is selecting the wrong value, thats the issue.
@Ritesh_Burman - I got your scenario. To make it clear, understand the possible scenarios
First, is the above scenario, where the previous month dates gets extend to the current month window
Second, the window may have only current month dates
Bot fails mostly, in the first case as the bot might not able to identify the right date if duplicates were present. So, one of the way to avoid this issue is, check from last row. (Go through above loop logic)
Let’s see how the above written logic works
Scenario1: when the previous month dates gets extend to the current month window
Let’s say you have to select 26 date, by going through (looping concept) the last row the bot selects the right value instead of top one
Scenario2: The window may have only current month dates
Since there will be no duplicates in this scenario, looping through the last row selects the right one anyway.
What about 1st March at the top row which is exact one but at last row the 1st April is blurry which is coming at the same page again. what abut this one then? always selecting from last row will not work for this case.