public string CaptureWebPageToFile(string filePath) { // ãã¼ã¸ã¤ã¡ã¼ã¸ããã¡ã¤ã«ã«ä¿åãã var now = DateTime.Now; Screenshot shot = null; do { shot = ((ITakesScreenshot )WebDriver).GetScreenshot(); if(DateTime.Now - now >= TimeSpan.FromSeconds(10)) { throw new SpecFlowException( "ãã£ããã£ã«10ç§ä»¥ä¸ãããã¾ããã" ); } }while(shot.AsByteArray.Length == 0 ); shot.SaveAsFile(filePath, ImageFormat.Png); return filePath; } private


{{#tags}}- {{label}}
{{/tags}}