Screenshots with timestamps


#1

Is there a way to add timestamp within screenshot?


#2
  1. You first generate todays date and put it into ${mydate}:

    {
    “Command”: “echo”,
    “Target”: “Generate TODAYs date in in YYYY-MM-DD format “,
    “Value”: “”
    },
    {
    “Command”: “storeEval”,
    “Target”: “var d= new Date(); var m=((d.getMonth()+1)<10)?‘0’+(d.getMonth()+1):(d.getMonth()+1); d.getFullYear()+”-”+m+”-"+d.getDate();",
    “Value”: “mydate
    },

  2. Then you add ${mydate} to the screenshot name:

    {
    “Command”: “captureEntirePageScreenshot”,
    “Target”: “article_${mydate}”,
    “Value”: “”
    },


#3

Thanks mate. I’ll give it a go.