/// <summary> /// Adds the value of the ClickablePoint property to the A11yElement's Properties dictionary /// </summary> /// <remarks> /// Requesting the clickable point property in Edge can cause a crash, /// so the clickable point property is not initially populated by <see cref="DesktopElementExtensionMethods.PopulatePropertiesAndPatternsFromCache(A11yElement)"/>. /// </remarks> private static void InitClickablePointProperty(this A11yElement a11yElement, IUIAutomationElement uiaElement) { if (a11yElement.IsEdgeElement()) { return; } int id = PropertyType.UIA_ClickablePointPropertyId; double[] clickablePoint = uiaElement.GetCurrentPropertyValue(id); if (clickablePoint == null) { return; } string name = A11yAutomation.UIAutomationObject.GetPropertyProgrammaticName(id); var prop = new A11yProperty { Id = id, Name = name, Value = new Point((int)clickablePoint[0], (int)clickablePoint[1]) }; a11yElement.Properties.Add(id, prop); }