How to take a screenshot in C#?

How to take a screenshot in C#?

Hi Miro Vasil,

To capture screenshots in C#, use the below capability: driver.TakeScreenshot().SaveAsFile(@"/Test/Test.png",ImageFormat.Png);