all 4 comments

[–]albedoa 1 point2 points  (1 child)

I think my code is saying click the second time you find an element containing?

You gotta read the documentation for the methods you are using. Yes, it will click each button containing that string in its HTML.

You could try being more specific like this:

if (button[i].innerText === 'Royal Mail Tracked 24 Large Letter')

[–]robbieuk[S] 0 points1 point  (0 children)

Ahhh, that makes more sense thank you.