How to Automate using selenium Java if data is there in divs and changes every time
just as in the above image there is use of divs and every time the data (image) in that div changes. You are not even sure that how many divs will be therewith respect to row and columns. Kindly guide if any one has idea about it. Thanks.
I am not sure I understand completly so here are two solutions:
If the image path does not change use css selector:
If the path does change and all you really need to do is select "some" product:
Query all divs that have a class 'card-item-img' and select any of them:
Personally if that is the case I would use a lamba: