-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix: use type-specific action IDs to comply with W3C WebDriver spec (… #14909
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
fix: use type-specific action IDs to comply with W3C WebDriver spec (… #14909
Conversation
|
@christian-bromann please review |
create-wdio
eslint-plugin-wdio
@wdio/allure-reporter
@wdio/appium-service
@wdio/browser-runner
@wdio/browserstack-service
@wdio/cli
@wdio/concise-reporter
@wdio/config
@wdio/cucumber-framework
@wdio/dot-reporter
@wdio/firefox-profile-service
@wdio/globals
@wdio/jasmine-framework
@wdio/json-reporter
@wdio/junit-reporter
@wdio/lighthouse-service
@wdio/local-runner
@wdio/logger
@wdio/mocha-framework
@wdio/protocols
@wdio/repl
@wdio/reporter
@wdio/runner
@wdio/sauce-service
@wdio/shared-store-service
@wdio/smoke-test-cjs-service
@wdio/smoke-test-reporter
@wdio/smoke-test-service
@wdio/spec-reporter
@wdio/static-server-service
@wdio/sumologic-reporter
@wdio/testingbot-service
@wdio/types
@wdio/utils
@wdio/webdriver-mock-service
@wdio/xvfb
webdriver
webdriverio
commit: |
christian-bromann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
|
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. We are looking forward to more contributions from you in the future 🙌 Have a nice day, |
…#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
Checklist
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
mainbranch 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 thev8branch.)v9and doesn't need to be back-ported#XXXXXFurther comments
Reviewers: @webdriverio/project-committers