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 get your method. But can you help me to make a flow for this. Just for the one you described in your answer. I didn’t get how to make such flow and make it work.
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!
Thanks for your response! Can you tell me how to uniquely identify the image? If we follow your case Bot will find multiple images. Can you explain in detail? I’ll defenitely give it a try then.
If the bot will find multiple images,
In this case will we get a set of coordinates for each image?
If we have a set of coordinates for each image,
we can make a loop (first we find the image on the top - we analyze coordinate y).
then we find the most left image (we analyze x coordinate)
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.