Does Microsoft UI Automation Framework work with Chrome, Python and Java Apps?

后端 未结 3 806
别那么骄傲
别那么骄傲 2021-01-01 05:49

I am working on an automation project, in which I need to capture the activities [ application launched, data entered, input type etc.] user performs on a desktop. I came ac

3条回答
  •  误落风尘
    2021-01-01 05:53

    I'm a bit late to the party.. But Chromes accessibility features are only activated once something tries to access it's accessibility.

    If you call AccessibleObjectFromWindow ([DllImport("oleacc.dll")]) with the window handle an existing chrome window will have its accessibility activated (and you'll see the actual web page content in UIA!).

    If the chrome window is opened after your app is running - Chrome pings open processes for any open accessibility apps... for that you use AccessibleObjectFromEvent and the event you're responding to comes from the windows pipeline: EVENT_SYSTEM_ALERT = 0x0002 .

    The bottom line is - you have to tell chrome that there's something installed that wants to access it's web page content.

    Oh! and your application has to be signed!! Unsigned apps won't be able to access web content - I think that's the same in firefox too.

    I hope this helps someone in the future.

    See: https://www.chromium.org/developers/design-documents/accessibility

提交回复
热议问题