continuum package¶
Submodules¶
- continuum.accessibility_concern
AccessibilityConcern
AccessibilityConcern.FixType
AccessibilityConcern.Standard
AccessibilityConcern.path
AccessibilityConcern.engine_test_id
AccessibilityConcern.attribute
AccessibilityConcern.best_practice_id
AccessibilityConcern.element
AccessibilityConcern.fix_type
AccessibilityConcern.needs_review
AccessibilityConcern.raw_engine_json_object
AccessibilityConcern.best_practice_description
AccessibilityConcern.severity
AccessibilityConcern.noticeability
AccessibilityConcern.tractability
AccessibilityConcern.best_practice_details_url
AccessibilityConcern.best_practice_standards
- continuum.amp_reporting_service
AMPReportingService
AMPReportingService.Report
AMPReportingService.Module
AMPReportingService.ReportManagementStrategy
AMPReportingService.ModuleManagementStrategy
AMPReportingService.active_report
AMPReportingService.active_module
AMPReportingService.active_report_management_strategy
AMPReportingService.active_module_management_strategy
AMPReportingService.set_driver()
AMPReportingService.set_active_organization()
AMPReportingService.set_active_asset()
AMPReportingService.set_active_report_by_id()
AMPReportingService.set_active_report_by_name()
AMPReportingService.set_active_module_by_id()
AMPReportingService.set_active_module_by_name()
AMPReportingService.set_active_report_management_strategy()
AMPReportingService.set_active_module_management_strategy()
AMPReportingService.submit_accessibility_concerns_to_amp()
NotFoundException
- continuum.assertion
Assertion
Assertion.TestType
Assertion.TestResult
Assertion.test_id
Assertion.test_type
Assertion.outcome
Assertion.results
- continuum.best_practice_data
BestPracticeData
- continuum.Configuration
Configuration
Configuration.AccessibilityConcerns
Configuration.Proxy
Configuration.LevelAccessPlatform
Configuration.access_engine_type
Configuration.amp_instance_url
Configuration.default_standard_ids
Configuration.include_potential_accessibility_concerns
Configuration.amp_api_token
Configuration.accessibility_concerns_configuration
Configuration.proxy_configuration
Configuration.level_access_platform_configuration
Configuration.load()
Configuration.is_pro_edition()
- continuum.continuum_base
ContinuumBase
- continuum.level_access_platform_reporting_service
LevelAccessPlatformReportingService
LevelAccessPlatformReportingService.org_instance_url
LevelAccessPlatformReportingService.workspace_id
LevelAccessPlatformReportingService.digital_property_id
LevelAccessPlatformReportingService.scan_tag_id
LevelAccessPlatformReportingService.session_name
LevelAccessPlatformReportingService.base_url
LevelAccessPlatformReportingService.open_scan_session()
LevelAccessPlatformReportingService.submit()
LevelAccessPlatformReportingService.complete_scan_session()
LevelAccessPlatformReportingService.set_driver()
- continuum.network_util
NetworkUtil
HttpErrorException
- continuum.test_types
TestType
Metadata
Module contents¶
continuum¶
This class encapsulates all of the helper functionality Access Continuum offers for running Access Engine to test web projects.
- class continuum.Continuum¶
Bases:
ContinuumBase
Constructor
- Returns
Continuum SDK
- Return type
- property accessibility_concerns: List[AccessibilityConcern]¶
Gets the list of accessibility concerns found by Access Engine during the last test execution.
- Returns
The list of accessibility concerns found by Access Engine during the last test execution
- Return type
List[AccessibilityConcern]
- property assertions: List[Assertion]¶
- Returns
The list of assertions returned by Access Engine during the last test execution
- Return type
List[Assertion]
- property include_potential_accessibility_concerns: bool¶
- Get
Gets whether or not accessibility concerns that require manual review are included in any of Continuum’s test results. If enabled, any accessibility concerns that require manual review will have
needs_review
return true. By default, this is specified byinclude_potential_accessibility_concerns
, i.e. the value for the ‘includePotentialAccessibilityConcerns’ attribute defined in continuum.json. This setting can be toggled programmatically usingContinuum.include_potential_accessibility_concerns
, overriding the value specified in continuum.json.- return
True if accessibility concerns that require manual review are included in any of Continuum’s test results, false if they are not
- rtype
bool
- Set
Globally sets whether or not accessibility concerns that require manual review are included in any of Continuum’s test results. If enabled, any accessibility concerns that require manual review will have
needs_review
return true. Using this method will override the value for the ‘includePotentialAccessibilityConcerns’ attribute defined in continuum.json, which is otherwise used by default.This method is only available in the Pro edition of Continuum.
- property amp_reporting_service: AMPReportingService¶
Gets the instance of the AMP reporting service associated with this instance of Continuum. Please consult our support documentation for more information on how to report to AMP.
- Returns
The AMP reporting service associated with this instance of Continuum
- Return type
- property level_access_platform_reporting_service: LevelAccessPlatformReportingService¶
Gets the instance of the Level Access Platform reporting service associated with this instance of Continuum. Please consult our support documentation for more information on how to report to Level Access Platform.
- Returns
The Level Access Platform reporting service associated with this instance of Continuum
- Return type
- get_supported_standards() dict ¶
Gets a map of IDs of accessibility standards (defined in AMP and supported by Continuum) to their names for the current test context and mobile type used previously to invoke
set_up()
. Make sure to invoke the set_up method before invoking this method.If a connection to AMP could not be established when best practice data was fetched from AMP, i.e. when Continuum was instantiated, this will return an empty map.
- Returns
A map of IDs of accessibility standards to their names
- get_supported_best_practices() dict ¶
Gets a map of IDs of best practices (defined in AMP and supported by Continuum) to their descriptions for the current test context and mobile type used previously to invoke
set_up()
. Make sure to invoke the set_up method before invoking this method.If a connection to AMP could not be established when best practice data was fetched from AMP, i.e. when Continuum was instantiated, this will return an empty map.
- Returns
A map of IDs of best practices to their descriptions
- get_supported_tests() dict ¶
Gets a map of IDs of automatic Access Engine tests (supported by Continuum) to their descriptions for the current test context and mobile type used previously to invoke
set_up()
. Make sure to invoke the set_up method before invoking this method.- Returns
A map of IDs of Access Engine tests to their descriptions
- set_up(web_driver: WebDriver, config_path: str) None ¶
Sets up Continuum for web testing.
- Parameters
web_driver – A Selenium web driver to test with
config_path – The absolute path to a valid continuum.js file
- run_all_tests(selector_for_node_to_test: Optional[str] = None) List[AccessibilityConcern] ¶
Tests the page under test for either accessibility concerns using Access Engine. Access Engine will be injected into the page if it is not already present.
- Parameters
selector_for_node_to_test – A CSS selector to restrict accessibility testing to
- Returns
A list of either accessibility concerns found by Access Engine
- Return type
list[AccessibilityConcern]
- run_all_tests_for_accessibility_concerns(selector_for_node_to_test: Optional[str] = None) List[AccessibilityConcern] ¶
Tests the page currently under test for accessibility concerns using Access Engine, injecting Access Engine into the page if it is not already present.
- Parameters
selector_for_node_to_test – A CSS selector to restrict accessibility testing to
- Returns
A list of accessibility concerns found by Access Engine
- Return type
list[AccessibilityConcern]
- run_all_tests_for_assertions() List[Assertion] ¶
Tests the page currently under test for assertions using Access Engine, injecting Access Engine into the page if it is not already present.
- Returns
A list of assertions found by Access Engine
- Return type
list[Assertion]
- test_for_standards(standard_ids: List[int], selector_for_node_to_test: str) List[AccessibilityConcern] ¶
Runs only the automatic Access Engine tests corresponding to the specified accessibility standards against the current page for only the specified node and all its children. Note that the IDs of the specified accessibility standards must also be specified by
default_standard_ids
, i.e. in the set of IDs implied from the value of the ‘get_default_standard_ids’ attribute defined in continuum.json, otherwise no accessibility concerns will be returned.- Parameters
standard_ids – The IDs of the accessibility standards to test for (invoke
get_supported_standards()
for a list of these, or consult AMP)selector_for_node_to_test – A CSS selector to restrict accessibility testing to
- Returns
The list of accessibility concerns found by Access Engine for the current page of the web driver that match the specified accessibility standards
- Return type
list[AccessibilityConcern]
- test_for_best_practices(best_practice_ids: List[int], selector_for_node_to_test: str) List[AccessibilityConcern] ¶
Runs only the automatic Access Engine tests corresponding to the specified best practices against the current page for only the specified node and all its children.
- Parameters
best_practice_ids – The IDs of the best practices to test for (invoke
get_supported_best_practices()
for a list of these, or consult AMP)selector_for_node_to_test – A CSS selector to restrict accessibility testing to
- Returns
The list of accessibility concerns found by Access Engine for the current page of the web driver that match the specified best practices
- Return type
list[AccessibilityConcern]
- run_tests(access_engine_test_ids: List[int], selector_for_node_to_test: str) List[AccessibilityConcern] ¶
Runs only the specified Access Engine tests against the current page for only the specified node and all its children.
- Parameters
access_engine_test_ids – The IDs of the automatic Access Engine tests to test for (invoke
get_supported_tests()
for a list of these, or consult AMP)selector_for_node_to_test – A CSS selector to restrict accessibility testing to
- Returns
The list of accessibility concerns found by Access Engine for the current page of the web driver that match the specified tests
- Return type
list[AccessibilityConcern]
- test_for_severity(min_severity: int, selector_for_node_to_test: str) List[AccessibilityConcern] ¶
Runs only the automatic Access Engine tests of or greater than the specified severity against the current page for only the specified node and all its children.
- Parameters
min_severity – The inclusive minimum severity of accessibility concerns to test for on a scale of 1 to 10, where 1 is the least severe and 10 is the most severe
selector_for_node_to_test – A CSS selector to restrict accessibility testing to
- Returns
The list of accessibility concerns found by Access Engine for the current page of the web driver whose severity is equal to or greater than
min_severity
- Return type
list[AccessibilityConcern]
- test_for_tractability(min_tractability: int, selector_for_node_to_test: str) List[AccessibilityConcern] ¶
Runs only the automatic Access Engine tests of or greater than the specified tractability against the current page for only the specified node and all its children.
- Parameters
min_tractability – The inclusive minimum tractability of accessibility concerns to test for on a scale of 1 to 10, where 1 is the least tractable and 10 is the most tractable
selector_for_node_to_test – A CSS selector to restrict accessibility testing to
- Returns
The list of accessibility concerns found by Access Engine for the current page of the web driver whose tractability is equal to or greater than
min_tractability
- Return type
list[AccessibilityConcern]
- test_for_noticeability(min_noticeability: int, selector_for_node_to_test: str) List[AccessibilityConcern] ¶
Runs only the automatic Access Engine tests of or greater than the specified noticeability against the current page for only the specified node and all its children.
- Parameters
min_noticeability – The inclusive minimum noticeability of accessibility concerns to test for on a scale of 1 to 10, where 1 is the least noticeable and 10 is the most noticeable
selector_for_node_to_test – A CSS selector to restrict accessibility testing to
- Returns
The list of accessibility concerns found by Access Engine for the current page of the web driver whose noticeability is equal to or greater than
min_noticeability
- Return type
list[AccessibilityConcern]
- get_page_metadata() Metadata ¶
Retrieves the set of metadata for the current page.
- Returns
The metadata for the current page.
- get_access_engine_version() str ¶
Queries the injected Access Engine for its version.
- Returns
the version of Access Engine being used by this instance of Continuum
- Return type
str