You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Another pseudoselector in jQuery that is pretty useful is the :eq(N). It returns the Nth occurence of a selector in the dom.
For some usages like assert.equal($('.user:eq(2)').text().trim(), 'James') it can be easily replaced by assert.equal(findAll('.user')[2].textContent.trim(), 'James').
However, this doesn't work for selectors like click('.profile-link:eq(2)').
An scape valve would be to allow helpers to receive HTMLElements instead of selectors, and do click(findAll('.profile-link')[0]).
That is my next issue.
The text was updated successfully, but these errors were encountered:
Another pseudoselector in jQuery that is pretty useful is the
:eq(N)
. It returns the Nth occurence of a selector in the dom.For some usages like
assert.equal($('.user:eq(2)').text().trim(), 'James')
it can be easily replaced byassert.equal(findAll('.user')[2].textContent.trim(), 'James')
.However, this doesn't work for selectors like
click('.profile-link:eq(2)')
.An scape valve would be to allow helpers to receive HTMLElements instead of selectors, and do
click(findAll('.profile-link')[0])
.That is my next issue.
The text was updated successfully, but these errors were encountered: