用于自动化无障碍工具的Robot Framework资源
项目描述
Robot Framework无障碍测试库
本包捆绑了各种Firefox扩展,用于网站无障碍检查,并附带一些胶水和预配置的Robot Framework关键字库,以启用使用Selenium的自动化无障碍回归测试。
本包不会取代人工无障碍审核。通过自动无障碍检查并不意味着您的网站是无障碍的。
然而,一旦您的网站已经过无障碍审核,这些工具可以帮助您通过自动和持续集成的无障碍测试来检测无障碍性回归。
(本包包括一个包含未修改的WAVE工具栏和未修改的WCAG对比度检查器扩展的Firefox配置文件。WAVE工具栏、其界面元素、设计元素、功能以及底层代码版权所有© WebAIM。)
安装
$ pip install robotframework-selenium2accessibility
示例测试
*** Settings ***
Resource Accessibility/wavetoolbar.robot
Resource Accessibility/contrastchecker.robot
Suite setup Run keywords
... Open accessibility test browser Maximize Browser Window
Suite teardown Close all browsers
*** Test Cases ***
Test single page
[Documentation] Single page test could interact with the target
... app as much as required and end with triggering
... the accessibility scan.
Go to http://www.plone.org/
Check WAVE accessibility errors
Test multiple pages
[Documentation] Template based test can, for example, take a list
... of URLs and perform accessibility scan for all
... of them. While regular test would stop for the
... first failure, template based test will just jump
... to the next URL (but all failures will be reported).
[Template] Check both WAVE and color contrast
http://www.plone.org/ wave=0 contrast=6
http://www.drupal.org/ wave=0 contrast=5
https://joomla.net.cn/ wave=0 contrast=9
http://www.wordpress.org/ wave=1 contrast=5
*** Keywords ***
Check both WAVE and color contrast
[Arguments] ${url} ${wave}=0 ${contrast}=0
Should not exceed maximum WAVE errors ${url} ${wave}
Should not exceed maximum color contrast issues ${url} ${contrast}
Should not exceed maximum WAVE errors
[Arguments] ${url} ${max}
${errors} = Count WAVE accessibility errors ${url}
Should be true ${errors} <= ${max}
... WAVE Toolbar reported ${errors} errors for ${url}
Should not exceed maximum color contrast issues
[Arguments] ${url} ${max}
${errors} = Count color contrast issues ${url}
Should be true ${errors} <= ${max}
... WCAG Contrast checker reported ${errors} issue for ${url}
运行
$ pybot demo.robot
变更日志
0.2.1 (2013-09-28)
更新了变更日志。
0.2.0 (2013-09-28)
重命名为robotframework-selenium2accessibility。一些与WAVE相关的关键字被重命名,以避免未来关键字名称中的命名空间冲突。请参阅文档了解当前关键字。
添加了WCAG对比度检查器、集成和关键字。
0.1.3 (2013-05-26)
修复了仅当WAVE工具栏报告错误时才获取页面截图的问题。
0.1.2 (2013-05-26)
更新了文档。
0.1.1 (2013-05-25)
修复了打包问题(从README中删除了非ASCII字符)
0.1.0 (2013-05-25)
第一个预发布版
项目详情
关闭
robotframework-selenium2accessibility-0.2.1.zip 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 6f453b7f3872ad44d4f45bc09b3959650e706a323948392a78a34297035f1448 |
|
MD5 | 86110d89222bd779c56ece6ec7159428 |
|
BLAKE2b-256 | b616c3a77b2c2e48061f52b129db796feeebdb1dbe7db39c2882d6263c4ab4ca |