I want to be able to simulate a click or keyboard input to a web element in my cefsharp (chromium) webbrowser.
Lets say I want to type "stack overflow," for instance, into the google searchbox. I want to be able to simulate that keyboard input into the google search box web element so that the search box says "stack overflow" and it would act as if a human typed "stack overflow."
Research: I have found out ways to do this (untested) in the visual studio web element, but not chromium. For reference, the code I found is browser.Document.GetElementById('web element').InvokeMember("Click")
however, I do not know if or how this works.
I have also found the ExecuteScriptAsync
function, but I am not sure how to use it. I am pretty sure I need to use executescriptasync, but I am not sure what parameters I would use.
My Setup: I am using visual basic, visual studio, and the cefsharp chromium-based web browser
The Question: To reiterate, I would like to be able to simulate keypresses and mouse clicks on certain web elements in a cefsharp browser.