Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Need Support]: Healing Driver fails when there is a conditional wait statement #291

Open
abdulquadirtp opened this issue Jan 22, 2025 · 0 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@abdulquadirtp
Copy link

Describe the problem

Hi @Alex-Reif @GannaChernyshova @YauheniPo @LittleDecorator @ElenaStepuro @valfirst @moinuddin14,

I am encountering an error while using the SelfHealing Driver and performing ExpectedConditions.visibilityOfElementLocated in Healenium when running the tests with mvn test.

Even though it is mentioned as Closed in #106, I still face the issue with latest versions.

Note : Strange behavior that this only fails while performing mvn test, While I execute using testng.xml using Intellij it works fine.

Code Line where It Fails :

WebElement Btn_next = wait.until(ExpectedConditions
.visibilityOfElementLocated(By.cssSelector("input[id='button9']")));

Console :

java.lang.NoClassDefFoundError: com/google/inject/Injector

at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3650)
at java.base/java.lang.Class.privateGetPublicMethods(Class.java:3675)
at java.base/java.lang.Class.getMethods(Class.java:2244)
at com.epam.healenium.utils.StackUtils.lambda$findAnnotatedInTrace$3(StackUtils.java:81)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:196)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:197)
at java.base/java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:1034)
at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:147)
at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:588)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:574)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:560)
at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:265)
at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:687)
at com.epam.healenium.utils.StackUtils.findAnnotatedInTrace(StackUtils.java:97)
at com.epam.healenium.utils.StackUtils.isAnnotationPresent(StackUtils.java:49)
at com.epam.healenium.SelfHealingEngine.isHealingEnabled(SelfHealingEngine.java:144)
at com.epam.healenium.handlers.proxy.BaseHandler.findElement(BaseHandler.java:57)
at com.epam.healenium.handlers.proxy.SelfHealingProxyInvocationHandler.invoke(SelfHealingProxyInvocationHandler.java:39)
at jdk.proxy2/jdk.proxy2.$Proxy42.findElement(Unknown Source)
at org.openqa.selenium.support.ui.ExpectedConditions$7.apply(ExpectedConditions.java:194)
at org.openqa.selenium.support.ui.ExpectedConditions$7.apply(ExpectedConditions.java:190)
at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:203)
at driver.workFlowAutomationDriverScript.openParentURL(driverScript.java:2262)

Healenium Web version

3.5.3

Healenium Backend version

3.4.6

Selenium version

4.23.0

Platform

Java

Properties file

recovery-tries=1
score-cap=.7
heal-enabled=true
serverHost=localhost
serverPort=7878
imitatePort=8000

Logs appeared during using Healenium

Console :		

java.lang.NoClassDefFoundError: com/google/inject/Injector

	at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
	at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3650)
	at java.base/java.lang.Class.privateGetPublicMethods(Class.java:3675)
	at java.base/java.lang.Class.getMethods(Class.java:2244)
	at com.epam.healenium.utils.StackUtils.lambda$findAnnotatedInTrace$3(StackUtils.java:81)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:196)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:197)
	at java.base/java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:1034)
	at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:147)
	at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:588)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:574)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:560)
	at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:265)
	at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:687)
	at com.epam.healenium.utils.StackUtils.findAnnotatedInTrace(StackUtils.java:97)
	at com.epam.healenium.utils.StackUtils.isAnnotationPresent(StackUtils.java:49)
	at com.epam.healenium.SelfHealingEngine.isHealingEnabled(SelfHealingEngine.java:144)
	at com.epam.healenium.handlers.proxy.BaseHandler.findElement(BaseHandler.java:57)
	at com.epam.healenium.handlers.proxy.SelfHealingProxyInvocationHandler.invoke(SelfHealingProxyInvocationHandler.java:39)
	at jdk.proxy2/jdk.proxy2.$Proxy42.findElement(Unknown Source)
	at org.openqa.selenium.support.ui.ExpectedConditions$7.apply(ExpectedConditions.java:194)
	at org.openqa.selenium.support.ui.ExpectedConditions$7.apply(ExpectedConditions.java:190)
	at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:203)
	at driver.workFlowAutomationDriverScript.openParentURL(driverScript.java:2262)

Additional context

No response

@abdulquadirtp abdulquadirtp added the help wanted Extra attention is needed label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants