The simplest solution would be to find a selector that is more precise as
it would avoid creating unwanted Navigator objects. So if you can come up
with something like
$("#radio1*.visible*").click()
It would be the best way.
The fallback here would be to get a list of all Navigators and filter them
using Groovy:
$("#radio1").*find
<https://docs.groovy-lang.org/latest/html/gapi/org/codehaus/groovy/runtime/DefaultGroovyMethods.html#find(Collection,
groovy.lang.Closure)>*(it.*isDisplayed
<https://gebish.org/manual/current/api/geb/navigator/Navigator.html#isDisplayed()>()*
).click()
Am Mo., 24. Aug. 2020 um 16:54 Uhr schrieb Ben Frey <[email protected]
>:
> I have a page that has one visible instance of a radio button, but the CSS
> selector (using id$=) returns more than one. How can I select only the
> visible one so I can use click()?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Geb User Mailing List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/geb-user/adc6b76c-a7e5-429a-a984-44754867b385n%40googlegroups.com
> <https://groups.google.com/d/msgid/geb-user/adc6b76c-a7e5-429a-a984-44754867b385n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
You received this message because you are subscribed to the Google Groups "Geb
User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/geb-user/CALYktxNc74au-_gcU9hEOM0gd1%3DuVA0cHcm_jKeG%2BmzbPC%3DftQ%40mail.gmail.com.