Skip to content

trying to use "contains" on a dynamic id of a checkbox #2486

Closed Answered by mdmintz
jorisstander asked this question in Q&A

You must be logged in to vote

That would just be selector of type: TAG[ATTRIBUTE^="VALUE"].

In your case: input[id^="checkbox"]
(for an input element that has an id that starts with checkbox)

Your full method call: sb.click('input[id^="checkbox"]')

Learn your CSS Selectors: https://www.w3schools.com/cssref/css_selectors.php

Replies: 1 comment 1 reply

You must be logged in to vote
1 reply
@jorisstander

Answer selected by mdmintz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants