I am using the below method to submit a form:
var _Command = "document.querySelector(\"body > x > y > z\").shadowRoot.querySelector(\"d > form > ep-button\").shadowRoot.querySelector(\"button\").click()"
JavascriptResponse scriptResult = await browser.EvaluateScriptAsync(_Command);
However this doesn't wait browser to fully load after command execution. How can I do that?
The command works I have tested
I am using .NET 7 and CefSharp.OffScreen
You can use WaitForNavigationAsync for this purpose.
WaitForNavigationAsyncTests xUnit Tests for reference.