UndeclaredThrowableException instead of NoSuchElementException

48 views
Skip to first unread message

jonas michel

unread,
Feb 22, 2018, 10:06:02 PM2/22/18
to Selenium Users
Hi,
recently while testing I stumbled onto something of wich I think it's a Bug.

I'm sorry I can't really show you the code, if it's necessary I will take the time to anonymize it.
I found a similar Bug in the Vaadin Testbench repository: https://github.com/vaadin/testbench/issues/477

We're developing an application in Vaadin (if it helps)

The Stacktrace is the Following. It happens on a call of SearchContex#findElement.

java.lang.AssertionError: Method invocation beaconRemovedFromView, in the class eu.gemtec.star.device.integration.pages.pible.BeaconConfigurationPage, failed
    at eu
.gemtec.star.commons.integration.AbstractSeleniumTest.executeFlowOnPage(AbstractSeleniumTest.java:165)
    at eu
.gemtec.star.commons.integration.LoadablePage.get(LoadablePage.java:212)
    at eu
.gemtec.star.commons.integration.AbstractSeleniumTest.testIt(AbstractSeleniumTest.java:110)
    at sun
.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun
.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java
.lang.reflect.Method.invoke(Method.java:498)
    at org
.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    at org
.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org
.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    at org
.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org
.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    at eu
.gemtec.star.commons.integration.ScreenshotTestRule$1.evaluate(ScreenshotTestRule.java:27)
    at eu
.gemtec.star.commons.integration.DownloadFileRule$1.evaluate(DownloadFileRule.java:36)
    at org
.junit.rules.RunRules.evaluate(RunRules.java:20)
    at org
.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    at org
.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    at org
.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    at org
.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org
.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org
.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org
.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org
.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org
.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    at org
.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
    at org
.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org
.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
    at org
.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org
.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:538)
    at org
.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:760)
    at org
.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:460)
    at org
.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:206)
Caused by: java.lang.reflect.InvocationTargetException
    at sun
.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun
.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java
.lang.reflect.Method.invoke(Method.java:498)
    at eu
.gemtec.star.commons.integration.AbstractSeleniumTest.executeFlowOnPage(AbstractSeleniumTest.java:163)
   
... 31 more
Caused by: org.openqa.selenium.TimeoutException: Timed out after 0 seconds waiting for eu.gemtec.star.commons.integration.util.WebElementHelper$RetryingTest$$Lambda$11/514793058@10ee04df
Build info: version: '2.53.1', revision: 'a36b8b1cd5757287168e54b817830adce9b0158d', time: '2016-06-30 19:26:09'
System info: host: '+++++', ip: '++++++++++++++', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_131'
Driver info: driver.version: unknown
    at org
.openqa.selenium.support.ui.FluentWait.timeoutException(FluentWait.java:292)
    at org
.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:261)
    at org
.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:205)
    at eu
.gemtec.star.commons.integration.util.WebElementHelper$RetryingTest.until(WebElementHelper.java:970)
    at eu
.gemtec.star.device.integration.pages.pible.BeaconConfigurationPage.verifyDeselectionOfBeacon(BeaconConfigurationPage.java:171)
    at eu
.gemtec.star.device.integration.ITBeaconConfiguration.beaconRemovedFromView(ITBeaconConfiguration.java:145)
   
... 36 more
Caused by: java.lang.reflect.UndeclaredThrowableException
    at com
.sun.proxy.$Proxy51.findElement(Unknown Source)
    at org
.openqa.selenium.support.pagefactory.DefaultElementLocator.findElement(DefaultElementLocator.java:69)
    at org
.openqa.selenium.support.pagefactory.AjaxElementLocator.access$001(AjaxElementLocator.java:41)
    at org
.openqa.selenium.support.pagefactory.AjaxElementLocator$SlowLoadingElement.isLoaded(AjaxElementLocator.java:157)
    at org
.openqa.selenium.support.ui.SlowLoadableComponent.get(SlowLoadableComponent.java:49)
    at org
.openqa.selenium.support.pagefactory.AjaxElementLocator.findElement(AjaxElementLocator.java:87)
    at org
.openqa.selenium.support.pagefactory.internal.LocatingElementHandler.invoke(LocatingElementHandler.java:38)
    at com
.sun.proxy.$Proxy48.isDisplayed(Unknown Source)
    at eu
.gemtec.star.commons.integration.htmlwrapper.HtmlWrapper.isDisplayed(HtmlWrapper.java:68)
    at eu
.gemtec.star.device.integration.pages.pible.BeaconConfigurationPage$BeaconEditor.isInitiallyLoaded(BeaconConfigurationPage.java:216)
    at eu
.gemtec.star.device.integration.pages.pible.BeaconConfigurationPage.lambda$3(BeaconConfigurationPage.java:171)
    at eu
.gemtec.star.commons.integration.util.WebElementHelper$RetryingTest.lambda$0(WebElementHelper.java:971)
    at org
.openqa.selenium.support.ui.FluentWait$3.apply(FluentWait.java:207)
    at org
.openqa.selenium.support.ui.FluentWait$3.apply(FluentWait.java:205)
    at org
.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:238)
   
... 40 more
Caused by: java.lang.reflect.InvocationTargetException
    at sun
.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
    at sun
.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java
.lang.reflect.Method.invoke(Method.java:498)
    at eu
.gemtec.star.commons.integration.util.proxy.SearchingInvocationHandler.invoke(SearchingInvocationHandler.java:65)
   
... 55 more
Caused by: org.openqa.selenium.NoSuchElementException: Unable to locate element: {"method":"id","selector":"beaconeditor.filler"}
Command duration or timeout: 14 milliseconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '2.53.1', revision: 'a36b8b1cd5757287168e54b817830adce9b0158d', time: '2016-06-30 19:26:09'
System info: host: '+++++', ip: '++++++++++++++', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_131'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{applicationCacheEnabled=true, rotatable=false, handlesAlerts=true, databaseEnabled=true, version=43.0, platform=WINDOWS, nativeEvents=false, acceptSslCerts=true, webStorageEnabled=true, locationContextEnabled=true, browserName=firefox, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
Session ID: d67dbe9f-a8ac-48fd-95da-56974b156d5f
*** Element info: {Using=id, value=beaconeditor.filler}
    at sun
.reflect.GeneratedConstructorAccessor25.newInstance(Unknown Source)
    at sun
.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java
.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org
.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
    at org
.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
    at org
.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678)
    at org
.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:327)
    at org
.openqa.selenium.remote.RemoteWebElement.findElement(RemoteWebElement.java:198)
    at org
.openqa.selenium.remote.RemoteWebElement.findElementById(RemoteWebElement.java:232)
    at org
.openqa.selenium.By$ById.findElement(By.java:218)
    at org
.openqa.selenium.remote.RemoteWebElement.findElement(RemoteWebElement.java:194)
   
... 59 more
Caused by: org.openqa.selenium.NoSuchElementException: Unable to locate element: {"method":"id","selector":"beaconeditor.filler"}
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '2.53.1', revision: 'a36b8b1cd5757287168e54b817830adce9b0158d', time: '2016-06-30 19:26:09'
System info: host: '+++', ip: '+++.+++.++.+++', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_131'
Driver info: driver.version: unknown
    at
<anonymous class>.FirefoxDriver.prototype.findElementInternal_(file:///C:/+++++++++++++++++++++++++++++++/anonymous7625649192759927947webdriver-profile/extensions/+++++++++++++++++++++++/components/driver-component.js:10770)
    at
<anonymous class>.FirefoxDriver.prototype.findChildElement(file:///C:/+++++++++++++++++++++++++++++++/anonymous7625649192759927947webdriver-profile/extensions/+++++++++++++++++++++++/components/driver-component.js:10782)
    at
<anonymous class>.DelayedCommand.prototype.executeInternal_/h(file:///C:/++++++++++++++++++++++++++++++++anonymous7625649192759927947webdriver-profile/extensions/+++++++++++++++++++++++/components/command-processor.js:12661)
    at
<anonymous class>.DelayedCommand.prototype.executeInternal_(file:///C:/+++++++++++++++++++++++++++++++/anonymous7625649192759927947webdriver-profile/extensions/+++++++++++++++++++++++/components/command-processor.js:12666)
    at
<anonymous class>.DelayedCommand.prototype.execute/<(file:///C:/+++++++++++++++++++++++++++++++/anonymous7625649192759927947webdriver-profile/extensions/+++++++++++++++++++++++/components/command-processor.js:12608)


Best wishes
Jonas Michek

Krishnan Mahadevan

unread,
Feb 22, 2018, 10:57:41 PM2/22/18
to seleniu...@googlegroups.com

Jonas,

 

Perhaps you are experiencing this: https://stackoverflow.com/q/19690653

 

But you would need to help provide a reproducible test, to confirm if this is indeed a bug.

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

Reply-To: <seleniu...@googlegroups.com>
Date: Friday, February 23, 2018 at 8:36 AM
To: Selenium Users <seleniu...@googlegroups.com>
Subject: [selenium-users] UndeclaredThrowableException instead of NoSuchElementException

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
selenium-user...@googlegroups.com.
To post to this group, send email to
seleniu...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/selenium-users/54e81bfe-471d-4281-88aa-e3824a0877a4%40googlegroups.com.
For more options, visit
https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages