Answer the question
In order to leave comments, you need to log in
FrameLoadEnd not firing on page load?
The trick is that when the page loads, you need to execute the method.
Why doesn't it work in this case?
Doesn't work with FrameLoadEnd :(
bool GoToPrintCard = false;
if(CanPrint && angle.QuerySelector("#b-case-header > ul.b-case-overview.g-ec > li.case-print > a") != null)
{
browser.ExecuteScriptAsync("document.querySelector('#b-case-header > ul.b-case-overview.g-ec > li.case-print > a').click();");
GoToPrintCard = true;
}
if(GoToPrintCard)
{
await Task.Run(async delegate
{
while (true)
{
if (angle.QuerySelector("#print > div.b-print-container > div.b-card-modes > a") != null)
{
await browser.PrintToPdfAsync(@"C:\Program Files (x86)\ArbitrPdfFiles\1");
break;
}
}
});
}
private async void button3_Click(object sender, EventArgs e)
{
await CreatePdf();
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question