Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@mccmrunal
Copy link
Contributor

#14740)

Proposed changes

This PR fixes issue #14740 where WebDriver actions fail due to conflicting input source IDs.

Problem: The current implementation uses a single global counter (actionIds) to generate IDs for all action types (key, pointer, wheel). This causes sequential IDs like action1, action2, action3 to be used across different action types, violating the W3C WebDriver specification which requires each input source ID to consistently map to the same action type throughout a session.

Error observed: WebDriverError: Expected input source "action1" to be type key, got pointer

Solution: Implement separate counters for each action type:

keyActionIds → generates key1, key2, key3
pointerActionIds → generates pointer1, pointer2, pointer3
wheelActionIds → generates wheel1, wheel2, wheel3.
This ensures each ID consistently maps to its action type, preventing conflicts when mixing action types in the same session.

Verification: Tested with the reproduction repository from the issue reporter. Tests that previously failed with Firefox/Geckodriver now pass.

Fixes #14740
//: # (Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.)

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

Note: This fix should likely be backported to v8 if the same issue exists there, as it's a W3C spec compliance fix.
//: # (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

@mccmrunal
Copy link
Contributor Author

@christian-bromann please review

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 2, 2025

Open in StackBlitz

create-wdio

npm i https://pkg.pr.new/webdriverio/webdriverio/create-wdio@14909

eslint-plugin-wdio

npm i https://pkg.pr.new/webdriverio/webdriverio/eslint-plugin-wdio@14909

@wdio/allure-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/allure-reporter@14909

@wdio/appium-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/appium-service@14909

@wdio/browser-runner

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/browser-runner@14909

@wdio/browserstack-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/browserstack-service@14909

@wdio/cli

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/cli@14909

@wdio/concise-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/concise-reporter@14909

@wdio/config

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/config@14909

@wdio/cucumber-framework

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/cucumber-framework@14909

@wdio/dot-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/dot-reporter@14909

@wdio/firefox-profile-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/firefox-profile-service@14909

@wdio/globals

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/globals@14909

@wdio/jasmine-framework

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/jasmine-framework@14909

@wdio/json-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/json-reporter@14909

@wdio/junit-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/junit-reporter@14909

@wdio/lighthouse-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/lighthouse-service@14909

@wdio/local-runner

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/local-runner@14909

@wdio/logger

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/logger@14909

@wdio/mocha-framework

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/mocha-framework@14909

@wdio/protocols

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/protocols@14909

@wdio/repl

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/repl@14909

@wdio/reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/reporter@14909

@wdio/runner

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/runner@14909

@wdio/sauce-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/sauce-service@14909

@wdio/shared-store-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/shared-store-service@14909

@wdio/smoke-test-cjs-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/smoke-test-cjs-service@14909

@wdio/smoke-test-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/smoke-test-reporter@14909

@wdio/smoke-test-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/smoke-test-service@14909

@wdio/spec-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/spec-reporter@14909

@wdio/static-server-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/static-server-service@14909

@wdio/sumologic-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/sumologic-reporter@14909

@wdio/testingbot-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/testingbot-service@14909

@wdio/types

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/types@14909

@wdio/utils

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/utils@14909

@wdio/webdriver-mock-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/webdriver-mock-service@14909

@wdio/xvfb

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/xvfb@14909

webdriver

npm i https://pkg.pr.new/webdriverio/webdriverio/webdriver@14909

webdriverio

npm i https://pkg.pr.new/webdriverio/webdriverio@14909

commit: 8e6cf23

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.

LGTM 👍

@christian-bromann christian-bromann added the PR: Bug Fix 🐛 PRs that contain bug fixes label Dec 24, 2025
@christian-bromann christian-bromann merged commit cc74357 into webdriverio:main Dec 24, 2025
62 checks passed
@wdio-bot
Copy link
Contributor

Hey mccmrunal 👋

Thank you for your contribution to WebdriverIO! Your pull request has been marked as an "Expensable" contribution.

We've sent you an email with further instructions on how to claim your expenses from our development fund.
Please make sure to check your spam folder as well. If you have any questions, feel free to reach out to us at expense@webdriver.io or in the contributing channel on Discord.

We are looking forward to more contributions from you in the future 🙌

Have a nice day,
The WebdriverIO Team 🤖

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

Labels

Expensable $35 💸 PR: Bug Fix 🐛 PRs that contain bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[🐛 Bug]: WebDriver actions fail due to conflicting input source ids (Expected input source "action1" to be type key, got pointer)

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.