Skip to content

[BUG]: SelfHealingDriverWait does not handle nested calls #314

Description

@joerg1985

Describe the bug

The SelfHealingDriverWait implementation does set the WaitCommand / FindElementWaitCommand flags on the driver and does reset them after leaving the wait. This does not work when waits are nested inside waits, so the flags are cleared after the first wait is done.

I don't know the use of these flags, but this might be an issue.

How to reproduce the issue

var wait = new SelfHealingDriverWait(_driver, Duration.ofMinutes(1));
        
        wait.until((d) -> {
            wait.until((d2) -> {
                return d2.findElement(By.id("mock")) != null;
            });

            return d.findElement(By.id("mock2")) != null;
        });

Logs appeared during using Healenium

N/A

Expected behavior

No response

Actual behavior

No response

Healenium Web version

Java 3.4.7

Healenium Backend version

N/A

Selenium version

No response

Platform

Java

Properties file

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions