Skip to content

[πŸš€ Feature]: [Java] Add EnhancedExpectedConditions for modern SPA and dynamic elementsΒ #16401

@maheswarRamisetty

Description

@maheswarRamisetty

Description

Modern web applications are often SPAs with dynamic content loaded via AJAX.
Selenium's current ExpectedConditions are limited to basic visibility, presence, and text checks, which often leads to flaky tests.

Have you considered any alternatives or workarounds?

Introduce a new helper wrapper class EnhancedExpectedConditions in Java to provide SPA-aware waits:

  • domReady() – waits for document.readyState == "complete" or staus change for buttons from disabled -> active.
  • ajaxRequestsComplete() – waits until all jQuery AJAX requests are done
  • elementHasClass(WebElement, String) – waits until an element has a specific class
  • elementTextMatches(WebElement, String regex) – waits until element text matches regex
  • attributeToContain(WebElement, String attribute, String substring) – waits until an element's attribute contains a substring

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-needs-triagingA Selenium member will evaluate this soon!C-javaJava BindingsI-enhancementSomething could be better

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions