TestProject Forum
Powered by leading experts in the test automation community

Unable to take screenshot of element Android device

I want to take a screenshot of element (image src) from Android mobile device. Element has been inspected and I have provided the local path to save the image. Still it throws exception.

Hello @rvignesh,
Is the screenshot of that element has not been saved in the path you provided? Is it a valid path?
What element are you trying to screenshot? Can you please share this element attribute so I could check it?

I am trying to take screenshot of a image in android device. I am signed in my application and there is a image under “Help” option. That image I have double shifted to take screenshot. Below is the elements locator. The image is not saved in the path and throwing exception.

I am using mac machine and yes its a valid path.

Finally I understood that my app is having security restrictions to take screenshot. Likewise many applications like Netflix cannot be taken screenshot.

Do you mind if we will move this conversation to the chat, and we will do a zoom session?
You can find us at the bottom right of your screen
image