javascript - Siesta selector by custom tags -
i want ask if in siesta possible write selector custom tag:
for example have component:
<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">
which console can select using css selector: document.queryselector('a[data-id="loginbtn"]')
but if write in siesta test: t.chain({click: '>> a[data-id="loginbtn"]'},
no component find.
how selector should find component?
the selector component should this:
t.chain( {click: 'a[data-id=loginbtn]'} )
the click method accepting actiontarget , , using >> used extjs component query. can find more info how specify target type on docs page.
if testing extjs app, should able click directly extjs button component. there multiple ways how target such button if have set config itemid unique id of component, query similar:
t.chain( {click: '>> button[itemid=loginbtn]'} )
Comments
Post a Comment