© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
8 replies
Diesel Geezer

How to check if element exists in html cefsharp

I tried this but it throws an exception that the response is null
string getElementByName = @"document.getElementsByName(""media"")[0];";
private async void jsgetval(string script)
{
    responseResult = "";
    JavascriptResponse response = await ytBrowser.EvaluateScriptAsync(script);
    responseResult = response.Result.ToString();
    Console.WriteLine(responseResult);
}
string getElementByName = @"document.getElementsByName(""media"")[0];";
private async void jsgetval(string script)
{
    responseResult = "";
    JavascriptResponse response = await ytBrowser.EvaluateScriptAsync(script);
    responseResult = response.Result.ToString();
    Console.WriteLine(responseResult);
}
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

how to get html element in .cshtml file
C#CC# / help
4y ago
❔ Cefsharp
C#CC# / help
4y ago
❔ How can I check if any element of a list is in another list?
C#CC# / help
4y ago
Wpf cefsharp ChromiumWebBrowser closed
C#CC# / help
4y ago