Hi there.
Could you please help me ?
I wanna take a screenshot with stamp (Date and time),
Thanks in advance
Hi there.
Could you please help me ?
I wanna take a screenshot with stamp (Date and time),
Thanks in advance
Abdullah Al-Tamimi said:
Hi there.
Could you please help me ?
I wanna take a screenshot with stamp (Date and time),Thanks in advance
use it
Date today = new Date()String todaysDate = today.format('MM_dd_yy');String nowTime = today.format('hh_mm_ss');WebUI.takeScreenshot("C:\\screens\\screenshot_"+ todaysDate +"-" + nowTime +".PNG");
for example result: screenshot_04_02_18-03_00_17.PNG
pay attention MM should be capital in todaysDate
Thanks a lot.
Itβs work with me
Iβm use
try { Date data = new Date(System.currentTimeMillis()) SimpleDateFormat formatarDate = new SimpleDateFormat('yyyyMMddHHmmss') WebUI.takeScreenshot(('C:\\screenshot\\screenshot_' + formatarDate.format(data)) + '.png')
}catch (Exception e) { e.printStackTrace()}
Result: screenshot_20180410135703.png