If you used the setFocus method of the automation element you mentioned, it should work fine, as itt (windows) would inform windowEyes of the focus change you caused. You could also just use the windowEyes .focus method, either way should work ok (assuming the automation element's setFocus method does work). Chip
_____ From: RicksPlace [mailto:[email protected]] Sent: Tuesday, May 29, 2012 8:53 AM To: [email protected] Subject: AutomationElement and Setting GWFocus HiGW Guys et al: I need to set the WE Focus to a AutomationElement in my script. There is one AutomationElement defined as type window but I may want to use some other AutomationElement for best results. In the WE Docs I see how to set a WE WindowObject using the Focus method but how do I set the WindowEyes focus using the UIA Dom AutomationElements since they are not WEWindows but just DOM TreeNodes with properties and methods. There is a SetFocus method for an AutomationElement but that is not the same as the WindowEyes Focus method. Otherwise, I need to somehow tell windoweyes not to hold focus on a Window after the window is hidden so the IDE will work properly. Many of these elements are WPF but some are sys 32 objects. I think the MainWindow is a sys32 object but dont hold me to that. I will need to be able to work with WPF Elements throughout scripting any Microsoft Software so this seems a relevant question at this time before I dig into more heavy scripting. Rick USA
