What am I doing wrong? My major problem is that I'm getting an error says:
error : The given path's format is not supported
I would like to save the file within the project itself under a folder I have already created named:Screenshots
public void TakeScreenShot()
{
string pth = System.Reflection.Assembly.GetCallingAssembly().CodeBase;
string actualPath = pth.Substring(0, pth.LastIndexOf("bin"));
string projectPath = new Uri(actualPath).LocalPath;
Screenshot ss = ((ITakesScreenshot)_driver).GetScreenshot();
string screenshot = ss.AsBase64EncodedString;
byte[] screenshotAsByteArray = ss.AsByteArray;
ss.SaveAsFile(projectPath+"Screenshots\\Drisha"+DateTime.Now.ToString()+".jpeg", ImageFormat.Jpeg);
}