Skip to content

fix(webdriver): click iOS elements with the W3C elementClick command - #5757

Open
elliotsabitov wants to merge 1 commit into
codeceptjs:4.xfrom
elliotsabitov:fix/ios-click-w3c
Open

elliotsabitov wants to merge 1 commit into
codeceptjs:4.xfrom
elliotsabitov:fix/ios-click-w3c

Conversation

@elliotsabitov

Copy link
Copy Markdown

Motivation/Description of the PR

click, checkOption and uncheckOption now use browser.elementClick on every platform. iOS sessions went through the JSON Wire touchClick command, which webdriverio 9 deprecates and webdriverio 10 removes. Android and desktop sessions already used elementClick, so only iOS behaviour changes.

Tested on AWS Device Farm with our iOS Safari journey suite (iPhone 16, iOS 18.0, Appium XCUITest, webdriverio 9.32, CodeceptJS 4.2.1) with this change applied. All 12 scenarios passed, every I.click went through elementClick, and the deprecation notice no longer appears. An unpatched run of the same setup printed it 22 times per device.

Applicable helpers:

  • Playwright
  • Puppeteer
  • WebDriver
  • REST
  • FileHelper
  • Appium

Type of change

  • 🐛 Bug fix

Checklist:

  • Tests have been added (the WebDriver helper tests run against desktop browsers, where this path does not change; iOS needs a real device or simulator)
  • Documentation has been added (no API change)
  • Lint checking (npm run lint)
  • Local tests are passed (npm run test:unit, 895 passing)

click, checkOption and uncheckOption called the JSON Wire touchClick command on non-Android mobile sessions. webdriverio 9 deprecates it and webdriverio 10 removes it. elementClick is the W3C command the helper already uses on Android and desktop, and Appium XCUITest supports it.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WebDriver helper clicks iOS elements with touchClick, which webdriverio 10 removes

1 participant