1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

AutomationElement

Discussion in 'C#' started by TBBW, Aug 31, 2010.

  1. TBBW

    TBBW New Member

    Joined:
    Aug 31, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi All,

    I use:

    Code:
    public static AutomationElement FindElementByProcessId(int pid)
            {
                AutomationElement element = null;
                PropertyCondition conds = new PropertyCondition      (AutomationElement.ProcessIdProperty, pid);
                while (element == null)
                    element = AutomationElement.RootElement.FindFirst(TreeScope.Children, conds);
                return element;
            }
    
    to find myProcess.

    how do I define to find a text edit box which has a fixed Id (1300).
    I find this number using Spy++

    regards,

    ger
     

Share This Page