I am able to capture the screenshots for both android and iOS device, but can I highlight the particular element when my assert fails

is appium supporting the highlighting the particular element after taking the screen shot for the failed tests???

Can you please share me the java code to take the screenshot on iOS

I don’t think Appium saves screenshots with highlighted elements out-of-the-box. What you can do, however, is take a screenshot, and then use some image manipulation library to draw a box around the offending element (the element’s dimensions can be retrieved using WebDriver’s API).