PA11Y动作参考 /文档
您如何输入值匹配名称=“”属性,还是class =“”?我猜想#指的是ID =“”?如果没有HTML ID属性,则需要一种匹配其他属性或元素本身的方法。
是否有有关如何使用动作的参考?
actions: [
'set field #login_field to abc',
'set field #password to defghi',
'click element #password"',
'wait for url to be http://github.com'
],
How do you enter values to match a name="" attribute, or class=""? I'm guessing that # is referring to id="" only? If HTML ID attributes are not available there needs to be a way to match other attributes or the element itself.
Is there a reference for how to use actions?
actions: [
'set field #login_field to abc',
'set field #password to defghi',
'click element #password"',
'wait for url to be http://github.com'
],
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
来自您链接的文档
您应该能够使用任何有效的CSS选择器,包括ID,类和更复杂的CSS选择器。例如,要单击具有
class =“ myClass”
的元素,您可以使用:使用
运行PA11Y - debug
flag应该帮助您了解该操作是否正常工作。对于像上面的示例,您应该能够看到与此类似的输出:From the documentation that you linked (emphasis mine):
You should be able to use any valid CSS selector, including IDs, classes, and more complex CSS selectors. For example, to click on an element with
class="myClass"
you could use:Running pa11y using the
--debug
flag should help you understand if the actions are working correctly. For an example like the one above you should be able to see an output similar to this:我找到了动作参考,尽管该项目的文档非常有限。据我所知,选择器似乎仅限于ID,如果没有的话,没有什么好。我希望硒型Selectors Inc X Path。
pa11y文档 - 操作
I found the actions reference, although the documentation is very limited for this project. Selectors seem limited to IDs as far as I can tell, not much good if there aren't any. I was hoping for Selenium-type selectors inc Xpath.
Pa11y Documentation - Actions