我想问一下是否可以在午睡中通过自定义标签编写选择器:
例如我有组件:
<a class="x-btn x-unselectable x-box-item x-toolbar-item x-btn-default-small" style="min-width: 75px; right: auto; left: 232px; top: 0px; margin: 0px;" hidefocus="on" unselectable="on" id="button-1017" data-id="loginBtn" tabindex="0" componentid="button-1017" target="_blank">
我可以从控制台选择使用 css 选择器:
document.querySelector('a[data-id="loginBtn"]')
但是如果我在午睡测试中写:
t.chain({click: '>> a[data-id="loginBtn"]'},
找不到组件。
选择器应该如何查找组件?