Skip to content

Conversation

@wswebcreation
Copy link
Member

@wswebcreation wswebcreation commented Sep 6, 2025

Proposed changes

The waitForClickable should not work for native apps, so we throw an error for now

Types of changes

  • Polish (an improvement for an existing feature)
  • 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 (improvements to the project's docs)
  • Specification changes (updates to WebDriver command specifications)
  • Internal updates (everything related to internal scripts, governance documentation and CI files)

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 the necessary documentation (if appropriate)
  • I have added proper type definitions for new commands (if appropriate)

Backport Request

//: # (The current main branch is the development branch for WebdriverIO v9. If your change should be released to the current major version of WebdriverIO (v8), please raise another PR with the same changes against the v8 branch.)

  • This change is solely for v9 and doesn't need to be back-ported
  • Back-ported PR at #XXXXX

Further comments

Reviewers: @webdriverio/project-committers

@wswebcreation wswebcreation added the PR: Polish 💅 PRs that contain improvements on existing features label Sep 6, 2025
@wswebcreation wswebcreation marked this pull request as ready for review September 6, 2025 08:36
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds error handling to prevent the waitForClickable command from being used in native mobile app contexts, where it is not supported. The change ensures consistent behavior between isClickable and waitForClickable commands.

  • Adds native context validation to waitForClickable command
  • Updates documentation to clarify browser-only support
  • Adds comprehensive test coverage for the new validation

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
packages/webdriverio/src/commands/element/waitForClickable.ts Adds native context check and throws error for mobile native apps, updates JSDoc
packages/webdriverio/src/commands/element/isClickable.ts Removes outdated comment about Appium platform support
packages/webdriverio/tests/commands/element/waitForClickable.test.ts Adds test case to verify error is thrown in native context
mocks/fetch.ts Updates mock to handle Android platform capabilities and removes browserVersion

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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.

👍

@christian-bromann christian-bromann merged commit 234e547 into main Sep 9, 2025
60 of 61 checks passed
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.

4 participants