I'm trying to build a classifier and in order to get the training data, I'm building a tool that can give me positive and negative examples. Since the examples are images I need to get their snapshots. Although I've selected the regions I want(red), to get their snapshots I've used html2canvas but it didn't seem to work. I have Xpaths of the elements(red) stored in some fields and want to convert them into an image that can be automatically downloaded when submit button is pressed. I'd be extremely grateful if someone can help me out. Selected regions are in red