Hi Brian, As you've probably realised by now, the failure you got was intended and has to do with issue #284 (https://github.com/geb/issues/issues/284).
Previously there was a lot of methods on Navigator which silently dealt only with the first element of the Navigator if it contained multiple elements. This could lead to subtle bugs where you were not aware that you are dealing with a multi element Navigator as in your case. This behaviour has been changed for 0.13.0 and calling such methods on a multi element navigator now throws the exception you got. I hope that this leads to better error reporting. Note that you are still able to call these methods on all elements of a Navigator if you do so explicitly by using the spread operator (*.). I hope that the exception message you experience is self explanatory and good enough to understand what the problem is. Let me know if you believe it could be improved. Cheers, Marcin On Mon, Oct 3, 2016 at 6:22 PM, Brian Westrich <[email protected]> wrote: > Brian, > > Good point. > > The selector I'm using is .... > > saveButton { $('button[id=save-button]') } > > which is specific enough, but our app had two buttons on the page that > used this same ID (a "no-no"). Once we corrected this the geb test passed. > Glad to see that geb 1-rc-1 caught this! > > Brian > > On Mon, Oct 3, 2016 at 10:39 AM, Brian Kotek <[email protected]> wrote: > >> Hmm...if older versions of Geb handled this, I'd say *that* is probably >> a bug, rather than the behavior you're seeing. Trying to click on two >> elements at once is something I'd expect to fail, because it means >> uncertainty about what is actually happening. Will it click the first >> element? The last one? Loop over them and click them both? I think the >> right thing to do would be to use a more specific selector, so that you're >> positive about what's going to be clicked on? >> >> >>> If I pause test execution in the debugger, I can see that there are 2 >>> context elements defined for the navigator. I also see 2 elements when >>> using the older version of geb, though it seems to be able to handle this. >>> >>>> >>>> -- > 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 post to this group, send email to [email protected]. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/geb-user/CAMvxi92SYFQ__bcTubxhXXnQUtmZ-% > 3DqdyX5p6NCp9EZisPLZNA%40mail.gmail.com > <https://groups.google.com/d/msgid/geb-user/CAMvxi92SYFQ__bcTubxhXXnQUtmZ-%3DqdyX5p6NCp9EZisPLZNA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- 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 post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/CA%2B52dQTMKXYqws3Aaj%3DuottYQJOK99wF%2B6oTEy8yYH5RN3bbzQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
