我有以下C#
var checktransaction = frame.EvaluateScriptAsync("document.querySelector('div[id=helpdiv]').innerText;");
我想通过其他条件检查交易
我尝试过:
if (checktransaction.ToString() == "Withdraw Successful.")
{
status.Invoke((MethodInvoker)delegate {
status.Text = "The transaction is successful.";
});
}
return value System.Threading.Tasks.Taks[CefSharp.JavascriptRespons]
我的英语不太好
更新:是的,到目前为止,我使用的是我的代码:
string script = string.Format("document.querySelector('div[id=helpdiv]').innerText;");
frame.EvaluateScriptAsync(script).ContinueWith(x =>
{
var response = x.Result;
if (response.Success && response.Result != null)
{
string s1 = (string)response.Result;
if(s1 == "Withdraw Successful.")
{
withdrowSuccessful = 10;
withdrowScucess = true;
status.Invoke((MethodInvoker)delegate
{
status.Text = "Withdraw Successful.";
});
}
}
});