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 |
Answered by
mdmintz
Feb 12, 2024
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 |
1 reply
Answer selected by
mdmintz
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That would just be selector of type:
TAG[ATTRIBUTE^="VALUE"].In your case:
input[id^="checkbox"](for an
inputelement that has anidthat starts withcheckbox)Your full method call:
sb.click('input[id^="checkbox"]')Learn your CSS Selectors: https://www.w3schools.com/cssref/css_selectors.php