trying to use "contains" on a dynamic id of a checkbox #2486
-
Hi, I've been trying to make seleniumbase press a checkbox that changes it's id every time the page refreshes. The css selector looks like this |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
That would just be selector of type: In your case: Your full method call: Learn your CSS Selectors: https://www.w3schools.com/cssref/css_selectors.php |
Beta Was this translation helpful? Give feedback.
That would just be selector of type:
TAG[ATTRIBUTE^="VALUE"]
.In your case:
input[id^="checkbox"]
(for an
input
element that has anid
that starts withcheckbox
)Your full method call:
sb.click('input[id^="checkbox"]')
Learn your CSS Selectors: https://www.w3schools.com/cssref/css_selectors.php