![]() ![]() Process process = Process.GetProcessesByName("Chromium") Ĭonsole.Write("Proccess found: " + process.ToString()) Ĭonsole.WriteLine("ERROR: Application is not running!\nException: " + ex.Message) Įxception: Index was outside the bounds of the array.Ĭ:\Program Files\dotnet\dotnet.exe (process 16720) exited with code -1. Public static extern bool SetForegroundWindow(IntPtr hWnd) I searched around, and I got some code, like the following: (.Net Core Console Project with C# 7.3) Therefore, I guess if I can write another program, can always bring the Puppeteer Sharp window to the front, then I don’t have to do this by hand. ![]() Like the URL detect and click are affected, therefore, they don’t work from time to time, but if I keep the Puppeteer Sharp window (showing the Chromium page) in front, then usually, the Puppeteer Sharp program works. As the web browsers hide Puppeteer Sharp window, then some actions, But from time to time, when I browse internet, web browsers are in front. I have a C# Console Project using Puppeteer Sharp to grab some web pages.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |