Beispiel #1
0
        /// <summary>
        /// Find an Active Accessible object on an appPath via the
        /// gui model and/or a guiPath via Active Accessibility.
        /// The appPath is applied first if not null, then the guiPath.
        /// </summary>
        /// <param name="xmlPath">the xmlPath to a control or null</param>
        /// <param name="guiPath">the guiPath to click or null</param>
        /// <returns>The Active Accessible object or null</returns>
        private AccessibilityHelper findInGui(XmlPath xmlPath, string guiPath)
        {
            string path = null;

            if (xmlPath != null && xmlPath.isValid())
            {
                path = xmlPath.Path;
            }
            if (Utilities.isGoodStr(guiPath))
            {
                path += guiPath;
            }
            if (!Utilities.isGoodStr(path))
            {
                return(null);
            }
            GuiPath gp = new GuiPath(Utilities.evalExpr(path));

            if (gp == null || !gp.isValid())
            {
                return(null);
            }
            return(gp.FindInGui(m_ah, this));
        }
Beispiel #2
0
 /// <summary>
 /// Find an Active Accessible object on an appPath via the
 /// gui model and/or a guiPath via Active Accessibility.
 /// The appPath is applied first if not null, then the guiPath.
 /// </summary>
 /// <param name="xmlPath">the xmlPath to a control or null</param>
 /// <param name="guiPath">the guiPath to click or null</param>
 /// <returns>The Active Accessible object or null</returns>
 private AccessibilityHelper findInGui(XmlPath xmlPath, string guiPath)
 {
     string path = null;
     if (xmlPath != null && xmlPath.isValid()) path = xmlPath.Path;
     if (Utilities.isGoodStr(guiPath)) path += guiPath;
     if (!Utilities.isGoodStr(path)) return null;
     GuiPath gp = new GuiPath(Utilities.evalExpr(path));
     if (gp == null || !gp.isValid()) return null;
     return gp.FindInGui(m_ah, this);
 }