Need to verify logo in Appium for android

Hi all,

We have appium -maven project. In our checkout page, We display payment cards image and element locator for that is “id”.
I wanna verify Visa /master or amex logo displayed in checkout page by comparing desired image .
Can somebody help what do i have to veify this?
There is no other attribute in image locator other than it’s id. So don’t know how to validate visa logo.payment_visa

did you try looking at appium eyes?
If it were me, I would get the devs to change the app, to make the ID under app control and unique… or I would screenshot and then use an image library to validate the screenshot. It’s a pretty mature approach to do image verification nowadays and no longer the minefield it used to be in the past.

We have ID but it’s not unique and these are existing functionality, dev is not willing to spend time to set unique id.I also like to take screenshots, but it’s taking whole page screenshots.

Do you know how to take screenshot using id?
Can you please give some sample code to fetch screenshot for specific element?

Indira , I feel your pain. The developer who is not willing to modify their code, is the dev who is not willing OWN the code. Basically they are forcing the tester to do completely unnecessary extra work which has a cost to the company every time that extra work breaks for any reason. If the code is legacy code, then fair enough, and to be honest that legacy code will also not need any testing since it’s legacy and remains untouched anyway? Right?

I don’t know about the appium language-bindings, but the webdriver bindings make it easy to just download image https://sqa.stackexchange.com/questions/40691/selenium-capture-dom-elements-image
Did you try that approach? This link actually shows 2 ways to do it.