Geb and Chromedriver 76 issues?

61 views
Skip to first unread message

jc

unread,
Aug 27, 2019, 2:46:08 PM8/27/19
to Geb User Mailing List
Is anyone aware of any issues with Geb and Chromedriver 76?  Ever since Chromedriver 76 was released our application under test has completely broken.  I have reported the issue on the Chromedriver user groups here: https://groups.google.com/forum/#!topic/chromedriver-users/Nv0Uo_lnmKg.  There was apparently some change/fix in Chromedriver 76: https://bugs.chromium.org/p/chromedriver/issues/detail?id=3074

My tests still work perfectly if I use Chromedriver 75, so there is something that changed in Chromedriver 76.  I just am not sure if it's an issue with our web app or if it's possible it's an issue with Geb?  The only reason I think it could possibly be a Geb issue is because when I try to find a simple element by name, I get the error noted in the link.

This fails with Chromedriver 76 but works with Chromedriver 75:
$(name: "Zip Code")

However, if I use the regular driver.findElement(By.name("Zip Code")) it works just fine with Chromedriver 76.

I'm willing to help with any debugging I just am not sure what to give right now.

Alexander Kriegisch

unread,
Aug 28, 2019, 12:33:32 AM8/28/19
to geb-...@googlegroups.com

I was also using Chromedriver 75 (more exactly, 75.0.3770.90) win32 with Chrome 76.0.3809.132 64-bit. For you I upgraded to Chromedriver 76, tried several versions such as 76.0.3809.12, 76.0.3809.68 and the latest 76.0.3809.126, ran a test also using navigators like:

$(name: "showAlert")
$("input", name: "showConfirm")


I did not experience any problems with Geb 3.0.1, Spock 1.3-groovy-2.5, Groovy 2.5.7, Selenium 3.14.0.

Maybe you can provide an MCVE on GitHub incl. Maven (preferred) or Gradle build.
--
Alexander Kriegisch
https://scrum-master.de
--
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 geb-user+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/d1161920-14a1-4987-906d-de27207080ff%40googlegroups.com.

jc

unread,
Aug 28, 2019, 9:39:37 AM8/28/19
to Geb User Mailing List
Thanks for the reply.  I am on Geb 3.0.1, Spock 1.3-groovy-2.5, Groovy 2.5.8, Selenium 3.141.59.

Unfortunately the application under test is currently under development in a test environment not accessible to the outside.  I know that doesn't help us, which stinks because I am getting desperate.  All I can say is that it is a React app and it has no issues working with Chromedriver 75.  Chromedriver 76 cannot locate any elements using Geb's method of locating them.  I've done some trouble shooting on a simple input field with this HTML:

Screen Shot 2019-08-28 at 8.29.49 AM.png


$(name: "Zip Code") << "12345"    //threw the "script returns unexpected result" exception.  *** Element info: {Using=name, value=Zip Code}
$("[name='Zip Code']") << "12345"    //threw the "script returns unexpected result" exception.  *** Element info: {Using=css selector, value=[name='Zip Code']}
$(By.name("Zip Code")) << "12345"     //threw the "script returns unexpected result" exception.  *** Element info: {Using=name, value=Zip Code}
driver.findElement(By.name("Zip Code")).sendKeys("12345") .  //this works just fine, but can't use this in pages can we?

So you can see the Geb way of locating the element is not working but the base selenium way seems to be working.

To be clear I am not saying Geb is the problem here.  I am just trying to narrow down where the issue might lie, whether it is in our application, the chromedriver 76, or possibly both.  I tried Chrome 77 Beta with the Chromedriver 77 and the issue is still there, so I am very concerned this will be an issue going forward unless the problem is identified.

I am just thinking there is SOMETHING that does not agree with the way Geb locates elements in combination with some javascript library running around out there that is unidentified.  I'm just trying to identify what that might be so that I can take it to the Chromedriver devs and see if it can be resolved.  I don't suspect the issue is with Geb, but I figured I could get some information on how the elements are located that might be different.

I am going to spend some time testing some other React websites and see if I can replicate the issue.  If I can I will put together an MCVE.


To unsubscribe from this group and stop receiving emails from it, send an email to geb-...@googlegroups.com.

jc

unread,
Aug 28, 2019, 12:41:17 PM8/28/19
to Geb User Mailing List
As an update, I ran tests against Facebook and Airbnb and had no issues with them.  I ran against another app we have here that was created from the same React "seed" and the issue is present there also.  So it does appear there is something in those applications causing this issue.  I am going to work with a developer and see what we can find out.  However, I am still a little curious why driver.findElement is working fine but the jQuery-like selector is not.

Marcin Erdmann

unread,
Sep 3, 2019, 4:34:40 PM9/3/19
to geb-...@googlegroups.com
Jeremy,

Not sure if it helps but what Geb does when you call $(name: "Zip Code") is driver.findElements(By.name("Zip Code")) as per the stacktrace you provided in the post to ChromeDriver mailing list:
....
at org.openqa.selenium.By$ByName.findElements(By.java:276)
at org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:311)
at geb.navigator.SearchContextBasedBasicLocator.elementsSupplier_closure8$_closure12(SearchContextBasedBasicLocator.groovy:199)
....

Note that it's calling findElements() and not findElement() like you did when you tried to reproduce. I would suggest trying to repro using findElements(), maybe that will help us to narrow it down. 

I would appreciate if you could post explanation what the issue was when you solve it, even if it's not Geb specific. And if it is then I'll do my best to help. Good luck chasing this, looks like a nasty one!

Marcin


To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/f29957a5-4a28-4b13-8823-a559d66d17b6%40googlegroups.com.

jc

unread,
Sep 5, 2019, 12:16:19 PM9/5/19
to Geb User Mailing List
I will post an explanation when we find one. Unfortunately I'm not sure when that is going to be and how difficult it will be. It is definitely related to Chromedriver 76 changes and not Geb from the looks of it.
Reply all
Reply to author
Forward
0 new messages