How to use FindFirst() method if I already know the name of the element

%3CLINGO-SUB%20id%3D%22lingo-sub-783897%22%20slang%3D%22en-US%22%3EHow%20to%20use%20FindFirst()%20method%20if%20I%20already%20know%20the%20name%20of%20the%20element%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-783897%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20using%20IUIAutomation%20interface%20of%20COM%20to%20write%20an%20Automation%20Client%20Application%20to%20automate%20a%20VFP%20(Visual%20FoxPro)%20app.%26nbsp%3B%20My%20question%20is%2C%20since%20I%20already%20know%20the%20name%20of%20a%20UI%20element%2C%20if%20and%20how%20I%20can%20directly%20use%20FindFirst()%20method%20of%20IUIAutomationElement%20interface%20to%20identify%20the%20UI%20element%2C%20rather%20than%20going%20through%20the%20Automation%20Tree%2C%20such%20as%20starting%20from%20the%20root%20element%20which%20is%20desktop.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ELook%20forward%20to%20your%20help!%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

I am using IUIAutomation interface of COM to write an Automation Client Application to automate a VFP (Visual FoxPro) app.  My question is, since I already know the name of a UI element, if and how I can directly use FindFirst() method of IUIAutomationElement interface to identify the UI element, rather than going through the Automation Tree, such as starting from the root element which is desktop.

 

Look forward to your help!

0 Replies