public async Task <IMagickImage> TakeScreenshot() { // Hide Scroll Bars, Trigger Resize Event, Scroll to top SeleniumUtils.ToggleScrollBars(_driver, false); SeleniumUtils.TriggerJSResizeEvent(_driver); // TODO Hide/Remove elements if told SeleniumUtils.NormalScroll(_driver, 0, 0); // Let the browser catch up await Task.Delay(250); var seOpts = new ScreenshotOptions(); var dimensions = SeleniumUtils.GetPageDimensions(_driver); var shot = SeleniumUtils.MakeAreaScreenshot(_driver, 0, 0, dimensions.PageWidth, dimensions.PageHeight, seOpts); // Show Scrollbars again // TODO UnHide/UnRemove elements if told SeleniumUtils.ToggleScrollBars(_driver, true); return(shot); }