microsoft / axe-windows

Automated accessibility testing engine for Windows applications
MIT License
136 stars 62 forks source link

Add ScanOptions.NativeWindowHandle to scope Scans to rooted UIA sub-tree #1022

Closed blackcatsonly closed 5 months ago

blackcatsonly commented 5 months ago

Details

Adds:

Motivation

Proposal to address issue #1021

Context

I exposed internals of A11yAutomation to the Integration Tests project so I could find a relevant IUIAutomationElement for testing the ScanOptions' HWND constraint

You could implement this as a "ForWindowHandle()" constraint on the Config, but my external tools use the same scanner repeatedly - it's the individual Scans whose scope needs to be constrained.

Pull request checklist

blackcatsonly commented 5 months ago

@JGibson2019 Proposed change to allow ScanOptions to limit the scope of the Scan

codeofdusk commented 5 months ago

Please update the documentation (docs/AutomationReference.md and, for the CLI, the README.md under src/cli) with your new options.

blackcatsonly commented 5 months ago

@DaveTryon @codeofdusk Thanks for reviewing. I believe I've addressed all the comments from the first iteration. Would you please take a second look?

codeofdusk commented 5 months ago

@blackcatsonly Please update the AutomationReference docs.

blackcatsonly commented 5 months ago

@codeofdusk Thanks, missed than one! Updated in latest iteration.

codeofdusk commented 5 months ago

/azp run

azure-pipelines[bot] commented 5 months ago
Azure Pipelines successfully started running 1 pipeline(s).
codeofdusk commented 5 months ago

/azp run

azure-pipelines[bot] commented 5 months ago
Azure Pipelines successfully started running 1 pipeline(s).
codeofdusk commented 5 months ago

/azp run

azure-pipelines[bot] commented 5 months ago
Azure Pipelines successfully started running 1 pipeline(s).
codecov-commenter commented 5 months ago

Codecov Report

Attention: Patch coverage is 94.23077% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 72.21%. Comparing base (4fc19c3) to head (aefe4da). Report is 383 commits behind head on main.

:exclamation: Current head aefe4da differs from pull request most recent head 37b41b3. Consider uploading reports for the commit 37b41b3 to get more accurate results

Files Patch % Lines
src/CLI/ScanRunner.cs 0.00% 1 Missing :warning:
src/Core/Bases/A11yElement.cs 0.00% 0 Missing and 1 partial :warning:
src/Desktop/UIAutomation/A11yAutomation.cs 96.55% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1022 +/- ## ========================================== - Coverage 73.70% 72.21% -1.49% ========================================== Files 398 424 +26 Lines 12046 13158 +1112 Branches 0 1413 +1413 ========================================== + Hits 8878 9502 +624 - Misses 3168 3243 +75 - Partials 0 413 +413 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codeofdusk commented 5 months ago

/azp run

azure-pipelines[bot] commented 5 months ago
Azure Pipelines successfully started running 1 pipeline(s).
blackcatsonly commented 5 months ago

Thanks @codeofdusk!