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

Allow isExisting to work with an composed element #7348

Merged
merged 2 commits into from
Aug 27, 2021

Conversation

christian-bromann
Copy link
Member

Proposed changes

If you create an element via:

const elem = await browser.$({ 'element-6066-11e4-a52e-4f735466cecf': otherElem.elementId })

WebdriverIO is currently unable to check its existence given that there are no selector information available. As a workaround this patch introduces a fix that uses getElementTagName to check if the element is stale or not.

fixes #7343

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

It would be ideal if there would be a way to allow fetching information about the element that allows to refetch it. I don't think this is possible. This should be simplified on protocol level.

Reviewers: @webdriverio/project-committers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Polish 💅 PRs that contain improvements on existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WebdriverIO.Element.isExisting fails when element found by elementId
1 participant