-3

After this code I have error:

gebLocator(wait: true) { $("a#fCoverage") }
browser.js.exec(gebLocator+ ".addEventListener('click', function(){alert('GTM')});")

Error message:

groovy.lang.MissingMethodException: No signature of method: geb.navigator.NonEmptyNavigator.plus() is applicable for argument types: (java.lang.String) values: [.addEventListener('click', function(){alert('GTM')});] Possible solutions: plus(geb.navigator.Navigator), has(java.lang.String), is(java.lang.String), last(), value(), add(java.lang.String)

plsgogame
  • 1,334
  • 15
  • 28
Denys Medvediev
  • 1,160
  • 3
  • 16
  • 32
  • `def "blablabla"(array2){ def map = arra1 System.println(map.getClass())//=class java.util.ArrayList for (i in 0..array2.size()){ assert map[i].equals(array2[i]) } return true }` – Denys Medvediev Feb 09 '15 at 16:47
  • Can you explain what your goal is that isn't met by list1.containsAll(list2). Are you in a unit test and need to know which elements are missing? – Poundex Feb 09 '15 at 16:53

1 Answers1

0

The error message means that you have tried to execute method plus(String) on NonEmptyNavigator what is impossible because NonEmptyNavigator doesn't have such a method.

If you want to execute js code using geb driver:

browser.js.exec("document.getElementById('fCoverage').addEventListener('click', function(){alert('GTM')});")
Bozydar Sobczak
  • 684
  • 5
  • 16