I embedded a CEF browser in the C# winform project. When I browse to a page, I need to use the touch event to click a button. The click event using javascript will be invalid. I can only open devtool by “touch:force-enabled" option. I also added "touch-devices=enabled" when the browser is initializing, but it also didn't work. So how do I get the browser to enter/exit touch mode? Or is there any other way to send a touch message to the browser?
My English may be a little bad, I hope everyone can understand, thank you for helping me!
These codes are invalid:
settings.CefCommandLineArgs.Add("touch-devices", "enabled");
settings.CefCommandLineArgs.Add("touch-events", "enabled");
Await webBrowser1.GetMainFrame().EvaluateScriptAsync("document.getElementsByClassName('in-need-pay-text')[0].click()");