如何单击与选择器匹配的所有元素,而不仅仅是第一个?
elems = browser.elements '.item-checkbox'
console.log elems
for elem in elems
# neither of these work
browser.click elem
elem.click()
{ state: 'success',
sessionId: '66fe2543-7b28-40e7-8bbb-d7da7d2af928',
hCode: 1564933402,
value:
[ { ELEMENT: '702' },
{ ELEMENT: '703' },
{ ELEMENT: '704' },
{ ELEMENT: '705' },
{ ELEMENT: '706' },
{ ELEMENT: '707' } ],
class: 'org.openqa.selenium.remote.Response',
status: 0 }