add missing takeScreenshot function

Signed-off-by: Yashar Ahmedizadeh <yashade2001@gmail.com>