I know that Strict, fuzzy & image selectors works simultaneously and which finds the target first will do its job but I really want to know When and where should I use image selector. Should I avoid it or should I use it ?
@prabin_chand1
Good Question.
you should Image selector on least priority and it has least one.
Where we can use Image selector?
We use Image selector where it is impossible to make strict selector.
A situation where every time selector changes dynamically and impossible to select it.
But parallel it contains disadvantages as well. Its not working when image is not clear or resolution issue.
But we can’t ignore it. Its really helpful in some scenarios.
The modern activities permit different input methods, also use those methods at the same time, it means that it will try to get the element with all the methods you’ve selected, of you have selected stric, fuzzy and image, then it will try first with fuzzy selector, later with strict, and finally with image. so it is basically another retry when the activitiy execute.
Disadventages is that images automation requires UI interface, it means a non background automation, if each activity will require images then it will be a foreground automation
Do not use image if you want to choose input field. If value of the input field is already filled and your image was taken on empty one - it could not work.
It will not work for dynamic tables like choose the correct record in table on some website as well.
It could be addition for buttons, static headers and etc. Always check if validation gives you 100%. If you have duplicates records for image then skip it.
I use it any time the UI Element won’t visually change. But if its color, font, size, highlight, etc will change then I deselect it. Also, if it’s something like a text box where the text inside - and therefore what it looks like - will change, then I deselect it.
I tend to use simple strict selector only a lot of the time because I don’t WANT the automation trying to be smart. I want it to find the exact element I tell it to find, or throw an exception. “Hey I found an element that’s pretty close” isn’t good enough.