Replies: 2 comments
-
|
Have you tried var div = await DevToolsContext.CreateHtmlElementAsync<HtmlDivElement>("div");
await div.ClickAsync();Otherwise you can execute any sort of javascript you like await div.EvaluateFunctionAsync("div => div.click()"); |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I don’t think the create will work as I need to click a specific div.
I was able to figure out the latter solution though and that works.
Thank you!
…On Fri, Sep 20, 2024 at 22:56 Alex Maitland ***@***.***> wrote:
Have you tried ClickAsync?
var div = await DevToolsContext.CreateHtmlElementAsync<HtmlDivElement>("div");
await div.ClickAsync();
Otherwise you can execute any sort of javascript you like
await div.EvaluateFunctionAsync("div => div.click()");
—
Reply to this email directly, view it on GitHub
<#24 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADVNZV6D7QO6XY7TGWS6BOTZXTN5JAVCNFSM6AAAAABN76SD4OVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTANZRGA3TANQ>
.
You are receiving this because you authored the thread.Message ID:
<ChromiumDotNet/WebView2.DevTools.
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to click a DIV but it doesn’t look like the HtmlDivElement has a click method on it. What is the best way to do this?
Beta Was this translation helpful? Give feedback.
All reactions