Closed
Description
I get this exception when trying to set an input field's value with the .value() method in a company project I'm working on. I tried to reproduce the issue in a public project to give a reproducible example but it works fine in the public project, which is inconvenient.
| groovy.lang.MissingMethodException: No signature of method: java.util.HashMap$Values.minus() is applicable for argument types: (java.util.ArrayList) values: [[input, select, textarea]]
Possible solutions: min(), min(groovy.lang.Closure), min(java.util.Comparator), find(), find(), unique()
at geb.navigator.NonEmptyNavigator.setInputValues(NonEmptyNavigator.groovy:704)
at geb.navigator.NonEmptyNavigator.value(NonEmptyNavigator.groovy:448)
at geb.content.TemplateDerivedPageContent.value(TemplateDerivedPageContent.groovy:33)
NonEmptyNavigator.groovy line 704 is
def unsupportedElements = inputsToTagNames.values() - ELEMENTS_WITH_MUTABLE_VALUE
In the past I've been bitten by HashMap.values() not being a normal collection type (List, Set, etc.) - it's a special class Values inside HashMap that doesn't have all the same collection methods as some of the more common collection classes.
From looking at what methods the Values class does have, it looks like it has the removeAll() method which could be a good substitute in this case.