//方法一
Task.Factory.StartNew(() =>
{
//int i = 0;
//var pageText = wb.GetTextAsync();
//while (!pageText.IsCompleted&&i<=99)
//{
// i++;
// Thread.Sleep(1);
//}
//var a = _chromeBrowser.GetTextAsync();
//while (!a.IsCompleted)
//{
// Thread.Sleep(1);
//}
});
方法二:
browser.GetTextAsync().ContinueWith(resTask =>
{
//数据
var data = resTask.Result;
});