Reputation: 1
I'm trying to solve this puzzle.
I have this script:
$('button[aria-label="Exam"]').trigger('click');
But I need to get also all those that start with Exam for example "Exam 1" or "Exam 202".
Upvotes: 0
Views: 347
Reputation: 68923
You can use Attribute Starts With Selector [name^="value"] that selects elements that have the specified attribute with a value beginning exactly with a given string.
$('button[aria-label^="Exam"]').trigger('click');
Upvotes: 1