google-chromepywinauto

pywinauto: accessing chrome gui


I am trying to select a printer and print on chrome browser, using pywinauto, but I am not able to access the gui components. I can see the components in Microsoft Inspect.exe in UIAutomation mode. (See screenshot).

I have started chrome with --force-renderer-accessibility flag.

I tried several things but I am not able to access anything in the chrome window. Is it possible to access the chrome gui components using pywinauto?

screenshot: ![Screenshot]1


Solution

  • Probably you use default backend="win32" which is used when you call Application(). To use MS UI Automation you have to set backend="uia" when instantiating Application object:

     app = Application(backend='uia').start('chrome.exe <other params>')
    

    My student wrote example script dragging file from explorer.exe to Google Drive in Chrome. Is it working for you?

    P.S. If you already use backend='uia', please provide more detailed description with some code and output.