private static void ExecuteScroll(HtmlPreview htmlPreview, object scrollPercentage) { var javascript = string.Format("window.scrollTo(0,{0} * (document.body.scrollHeight - document.body.clientHeight));", scrollPercentage); htmlPreview.host.ExecuteScriptAsync(javascript); }