Closed
Description
Meta -
OS: OSX
Selenium Version: 3.3.1, IntelliJ
Browser: Chrome 60
Browser Version:
Version 60.0.3112.90 (Official Build) (64-bit)
Expected Behavior -
No null pointer exception when calling webDriver.findElements
Actual Behavior -
Occasionally, calling webDriver.findElements(By.cssSelector(query))
causes a null pointer exception. Here is the stack trace:
java.lang.NullPointerException
at org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:450)
at org.openqa.selenium.remote.RemoteWebDriver.findElementsByCssSelector(RemoteWebDriver.java:509)
at org.openqa.selenium.By$ByCssSelector.findElements(By.java:441)
at org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:402)
at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.openqa.selenium.remote.Augmenter$CompoundHandler.intercept(Augmenter.java:189)
at org.openqa.selenium.remote.RemoteWebDriver$$EnhancerByCGLIB$$88202d8c.findElements(<generated>)
Steps to reproduce -
It seems to happen only rarely happen so it's hard to reliably reproduce. I think it is a race condition. There was a recently a report of a similar issue in: #4375