How to invoke chrome extension from application with parameters and receive response for the same?

137 Views Asked by At

I am using Accessibility Insights extension to find accessibility issues in web apps and sites. Now, I wanted to create an application through which I want to invoke this extension along with my URLs and want the issues found by the extension for my URLs as a response. I am wondering if this is possible with .NET or JavaScript applications or by any other way?

2

There are 2 best solutions below

3
On BEST ANSWER

You might consider using the Accessibility Insights scanning CLI package, available here. This CLI shares a lot of code with in the browser extension, but without requiring you to drive any browser UI elements.

This CLI is still in fairly early development, so there's always a potential risk of command line changes in future versions, but we'll try to keep things as backward-compatible as we can.

(I work on the Accessibility Insights Team)

0
On

You can run tool with --crawl parameter like in an example below. The tool will output the raw scan data in ./ai_scan_cli_output/key_value_stores/scan-results/*.axe.json file. The json file will contain scan result that is reflected in HTML report. The json file format is generated by the axe package where you can get more info about format details.

ai-scan --crawl --maxUrls 1 --url https://www.example.com/