New issue
Advanced search Search tips

Issue 785427 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Feature
Team-Accessibility



Sign in to add a comment

IUIAutomation.ElementFromPoint not supported

Reported by supp...@quickmacros.com, Nov 15 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0

Steps to reproduce the problem:
1. Run Chrome so that it accessibility is enabled. For example with command line --force-renderer-accessibility
2. Try to get an UI Automation element from any point in Chrome window. For example the address field. For it can use inspect.exe or call IUIAutomation.ElementFromPoint.

What is the expected behavior?
IUIAutomation.ElementFromPoint should get the UI Automation element.

What went wrong?
IUIAutomation.ElementFromPoint always gets the same UI Automation element, which is a control of class "Intermediate D3D Window" that covers all other UI Automation elements in Chrome window.

Did this work before? N/A 

Chrome version: Version 64.0.3269.0 (Official Build) canary (64-bit)  Channel: canary
OS Version: 10.0
Flash Version: 

About 1 year ago some Chrome version had this problem with AccessibleObjectFromPoint. It was fixed.
 
Components: Blink>Accessibility
Components: -Blink>Accessibility UI>Accessibility>Compatibility
Labels: -Pri-2 -Arch-x86_64 -Via-Wizard-Other UIAutomation Pri-3
Status: Available (was: Unconfirmed)
I'm surprised this doesn't work, since in many other ways UI Automation falls back on MSAA by default, and we do implement IAccessible::accHitTest.

I'd suggest using IAccessible::accHitTest as a workaround, but otherwise we'll put this on our future roadmap.


IAccessible::accHitTest gets IAccessible. How to get IUIAutomationElement from it? Chrome does not support IUIAutomation::ElementFromIAccessible.
Labels: a11y-secondary

Comment 5 by yezdi...@gmail.com, May 22 2018

Hi,

I am not able to get the Address and Search Bar when I run chrome as administrator. What is the solution for this behavior. I am using the latest version of Chrome and UIAutomation code pasted here 

public static string GetActiveTabUrl()
{
  Process[] procsChrome = Process.GetProcessesByName("chrome");

  if (procsChrome.Length <= 0)
    return null;

  foreach (Process proc in procsChrome)
  {
    // the chrome process must have a window 
    if (proc.MainWindowHandle == IntPtr.Zero)
      continue;

    // to find the tabs we first need to locate something reliable - the 'New Tab' button 
    AutomationElement root = AutomationElement.FromHandle(proc.MainWindowHandle);
    var SearchBar = root.FindFirst(TreeScope.Descendants, new PropertyCondition(AutomationElement.NameProperty, "Address and search bar"));
    if (SearchBar != null)
      return (string)SearchBar.GetCurrentPropertyValue(ValuePatternIdentifiers.ValueProperty);
  }

  return null;
}

Sign in to add a comment