[Solved] How to add mousDown event in chromium browser c# wpf
Use PreviewMouseDown event instead of MouseDown, I guess it would make it work. 0 solved How to add mousDown event in chromium browser c# wpf
Use PreviewMouseDown event instead of MouseDown, I guess it would make it work. 0 solved How to add mousDown event in chromium browser c# wpf
The issue is that your FileName has single slashes in it. JS will interpret those slashes as escape characters. The simplest solution is to replace your single slashes with double slashes: _mainWindow.Browser.ExecuteScriptAsync( “document.getElementById(‘location’).value=” + ‘\” + openFileDialog.FileName.Replace(@”\”, @”\\”) + ‘\”); solved Path separators are missing
As your JavaScript causes a navigation you need to wait for the new page to load. You can use something like the following to wait for the page load. // create a static class for the extension method public static Task<LoadUrlAsyncResponse> WaitForLoadAsync(this IWebBrowser browser) { var tcs = new TaskCompletionSource<LoadUrlAsyncResponse>(TaskCreationOptions.RunContinuationsAsynchronously); EventHandler<LoadErrorEventArgs> loadErrorHandler = null; EventHandler<LoadingStateChangedEventArgs> … Read more