Queries relative to located elements #145
Unanswered
bcpeinhardt
asked this question in
Q&A
Replies: 1 comment 2 replies
-
LOL NEVERMIND "../../select" worked don't mind me just a professional QA engineer not realizing a need to go up above the select before / down to it. Not my proudest moment. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What's the easiest way to get the parent of a WebElement? I'm hoping to start with a located WebElement struct, and devise a query to get the parent.
My use case atm is for SchnauzerUI. Often the only visible representation of a select element is it's default option.
I'd like the user to be able to type something like
locate "select role" and select "admin user"
where the select role text is one of those default options that is meant to represent no choice was made. I don't want to edit the overall locate logic, because then users wouldn't be able to locate option elements by visible text. Rather, when the select command is executed, I want it to be smart enough to swap out the located default option with its select before casting with Select::new().I was hoping a relative query would work, so something like
but this is producing an error. Any advice helps!
Beta Was this translation helpful? Give feedback.
All reactions