Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Auto-enable accessible objects in Chrome
#1
The Chrome web browser supports accessible objects in web pages, but this is disabled by default. QM tries to auto-enable it on demand, but with some Chrome versions it fails (always or in some cases).

You can explicitly enable Chrome accessible objects: run chrome.exe with command line --force-renderer-accessibility. Before it make sure there are no hidden chrome.exe processes.
 
Code:
Copy      Help
run "chrome.exe" "--force-renderer-accessibility"

The alternative way (code deleted) no longer works. Use the above way.
#2
Hello Gintaras,

Is there a similar function to enable_chrome_acc_t that can be applied to Microsoft Edge browser?
I came across a problem where objects on Microsoft Edge are inaccessible, and only become accessible once using the ''find accessible objects'' dialog from QM
#3
Maybe you use an old QM version. Current version auto-enables Edge objects.

Tested with this code:
 
Code:
Copy      Help
int w=wait(3 WV win("- Microsoft​ Edge" "Chrome_WidgetWin_1"))
Acc a.Find(w "LINK" "QM3 preview" "" 0x3001 3)
out a.Name

Also try this new program. It finds Chrome and Edge objects ~30 times faster. Auto-enables objects better than QM.
https://www.libreautomate.com/
#4
Thank you for your quick response!

I work at a place where upgrading to the latest QM would likely not be possible.
They are running QM version 2.4.2.2
Is there any way to still get those accessible objects from Edge? What code does the "Accessible objects actions" dialog in QM run in the background to make this possible?

Thanks in advance
#5
The dialog just uses API to get "object from mouse position". Then Edge enables objects. But Edge does not enable objects when something uses API for finding objects.

Function EnableChromeAcc
Code:
Copy      Help
function [w]

;Enables accessible objects in Chrome or Edge.

;w - browser window handle. If 0, this function tries to find Chrome or Edge.


if !w
,w=win("Google Chrome" "Chrome_WidgetWin_1")
,if !w
,,w=win("Microsoft​ Edge" "Chrome_WidgetWin_1")
,,if(!w) end "Browser window not found"

int c=child("" "Chrome_RenderWidgetHostHWND" w)
if(!c) end "Browser child window not found"

SendMessage(c WM_GETOBJECT 0 1)
Acc a.FromWindow(c OBJID_CLIENT)
rep 100
,int n=a.ChildCount
,if(n>0) break
,a.Name
,a.a.DefaultAction(0)
,0.02
#6
That works! Thank you so much!


Forum Jump:


Users browsing this thread: 1 Guest(s)