Hi, automating a Chrome internal page like the chrome://flags or chrome://extensions page is not possible in web automation mode, but it works great in desktop automation with XClick and XType. I created a small demo macro. It changes the status of the 2D canvas accerlation from disabled to enabled. Note that I first enter “2D” in the search box the display the option, and then text search (with local OCR) for the word “disabled”. Then simulate key down and enter press - and done!
Macro:
{
"Name": " ChromeInternal",
"CreationDate": "2022-11-22",
"Commands": [
{
"Command": "store",
"Target": "true",
"Value": "!errorignore",
"Description": "Internal pages do not fire a page load event, so there will be a timeout error with the OPEN command below."
},
{
"Command": "store",
"Target": "3",
"Value": "!timeout_pageload",
"Description": "Otherwise we would wait forever, as internal pages have no load event"
},
{
"Command": "open",
"Target": "chrome://flags/",
"Value": "",
"Description": "Load flags page"
},
{
"Command": "store",
"Target": "false",
"Value": "!errorignore",
"Description": "Back to normal: Stop for errors"
},
{
"Command": "bringBrowserToForeground",
"Target": "true",
"Value": "",
"Description": ""
},
{
"Command": "XDesktopAutomation",
"Target": "true",
"Value": "",
"Description": ""
},
{
"Command": "XClick",
"Target": "ocr=Search",
"Value": "",
"Description": "Click in search box"
},
{
"Command": "XType",
"Target": "2D",
"Value": "",
"Description": "Search for setting"
},
{
"Command": "XClick",
"Target": "ocr=Disabled",
"Value": "",
"Description": "Open the dropdown"
},
{
"Command": "XType",
"Target": "${KEY_DOWN}",
"Value": "",
"Description": ""
},
{
"Command": "XType",
"Target": "${KEY_ENTER}",
"Value": "",
"Description": ""
}
]
}
See also: Automate Chrome extension