Timestamp Within The Screenshot

47 views
Skip to first unread message

ramen das

unread,
Apr 10, 2024, 10:19:13 PM4/10/24
to Selenium Users
Hi Everyone,

I want to get a screenshot with the timestamp from taskbar. Is there any possibility to get this kindly help me on this. Currently I am to get screenshot only for the web driver and I need to enhance this.

I attached the screenshot below:

scn3.png

Sir Jo

unread,
Apr 14, 2024, 9:19:48 AM4/14/24
to Selenium Users
Yes, you can make a screenshot of the entire screen, for example:

Private Function TakeScreenShot() As Bitmap
   Dim screenSize As Size = New Size(My.Computer.Screen.Bounds.Width, My.Computer.Screen.Bounds.Height)
   Dim screenGrab As New Bitmap(My.Computer.Screen.Bounds.Width, My.Computer.Screen.Bounds.Height)
   Dim g As Graphics = Graphics.FromImage(screenGrab)
   g.CopyFromScreen(New Point(0, 0), New Point(0, 0), screenSize)
   Return screenGrab
End Function
Reply all
Reply to author
Forward
0 new messages