I want to know if anyone have ever worked on picking element based on color. I want to click on the free slot on calendar which has color white. I have tried using the get element property but I couldn’t find any unique feature for it.
This is the image. You can see the available and not available slots. I want to click on the first available slot. In this below image its 19, but it will vary for every month, of course!
Hi @Muhammad_Hayyan , Is this calendar on the web?
you can do 31 screen of the days of the month, with the white background: if the bot not find the first pass to the second… and so on.
obviously there is no need to enter 31 “element exist” activities:
put a loop in the workflow. Now, go in your screens folder and call the pics “screen_day_x”. (x from 1 to 31)
Go into the loop and replace x with the loop variable and with an “element exist” determine if the day is free or not
To be faster, the loop variable can start from the current day, rather than 1
I am doing web autuomation. Even now I didnt get what you want to say. So basically its online calendar where I have to select the day. I found out the way to select the first available slot but I want some method which is more efficient. The only way to achieve efficiency is to click on element based on color. I hope you understand my scenario.
Thank you for your efforts!
Hi @pedro.azevedo, excellent question:
i > 31 is correct, the loop running on the NO rather than YES condition. I have reversed them for more clarity. i <=31 would be ok if the cycle runs for positive condition!
I am so happy that you are taking so interest. Although I have completed the project but I am glad that you are on this topic so I really want to know if you have any way to solve this problem. like I am still working on this project if your solution turns out to be more efficient I am defenitely gonna use it.
Yes we can use get element activity. Infact I am using it in my case. It is difficult to find the unique ID for it. I tried the support team’s method, it is workin fine for me.
I still am not able, how to make your solution, of click on image work for me. But yes I am here to discuss that with you anytime. Feel free to share.