Skip to content

(@webdriverio): add check of element size if subtree is hidden to isElementDisplayed#11755

Merged
christian-bromann merged 4 commits intowebdriverio:mainfrom
HannaTarasevich:fix.11710
Nov 28, 2023
Merged

(@webdriverio): add check of element size if subtree is hidden to isElementDisplayed#11755
christian-bromann merged 4 commits intowebdriverio:mainfrom
HannaTarasevich:fix.11710

Conversation

@HannaTarasevich
Copy link
Contributor

@HannaTarasevich HannaTarasevich commented Nov 28, 2023

Proposed changes

Fix #11710

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • I have added proper type definitions for new commands (if appropriate)

Further comments

Reviewers: @webdriverio/project-committers

@HannaTarasevich HannaTarasevich changed the title (@webdriverio): add check of element size if subtree is hidden (@webdriverio): add check of element size if subtree is hidden to isElementDisplayed Nov 28, 2023
Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems reasonable to me. Unfortunately we don't have an extensive test suite for this as the script was pretty much copied from safaridriver afaik. I will go ahead and merge but in case there are issues raised of isDisplayed not working correctly anymore I will revert the change.

Let's see, anyway, thanks a lot for your contribution, great work 👍

@christian-bromann christian-bromann added the PR: Bug Fix 🐛 PRs that contain bug fixes label Nov 28, 2023
@christian-bromann christian-bromann merged commit fb59fff into webdriverio:main Nov 28, 2023
@HannaTarasevich HannaTarasevich deleted the fix.11710 branch November 28, 2023 17:18
@HannaTarasevich
Copy link
Contributor Author

Just some details in case of any issues:
This PR addresses the issue where the target element was incorrectly flagged as not visible when its subtree was hidden, despite being displayed.

The modification now ensures that an element is marked as not visible when both its subtree is hidden and it lacks its own bounding values. This adjustment aims to improve the accuracy of visibility checks.

Thanks!

@HannaTarasevich
Copy link
Contributor Author

Hi @christian-bromann,
Could you please share the approximate timeline of the release for these changes?

@christian-bromann
Copy link
Member

I just released v8.24.4 that contains this bug fix. I wanted to do run it yesterday but forgot about it, thanks for pinging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Bug Fix 🐛 PRs that contain bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[🐛 Bug]: waitForDisplayed method does not work properly for Chrome

2 participants