takeScreenshot() method sample