Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Process[] procsChrome = Process.GetProcessesByName("chrome");
- foreach(Process chrome in procsChrome)
- {
- if(chrome.MainWindowHandle == IntPtr.Zero)
- {
- continue;
- }
- AutomationElement mainWindow = AutomationElement.FromHandle(chrome.MainWindowHandle);
- elmUrlBar = mainWindow.FindFirst(TreeScope.Descendants, new PropertyCondition(AutomationElement.ControlTypeProperty, ControlType.Edit));
- //elmUrlBar on some computers inited, on some NULL. But versions of Chrome are identical.
- ...
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement