Skip to content

fix: direction and scrollableElement error#14023

Merged
christian-bromann merged 2 commits intomainfrom
ws/fix-14019
Jan 2, 2025
Merged

fix: direction and scrollableElement error#14023
christian-bromann merged 2 commits intomainfrom
ws/fix-14019

Conversation

@wswebcreation
Copy link
Member

This PR fixes #14019

Proposed changes

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

- update code and fix tests
Copy link
Member Author

@wswebcreation wswebcreation left a comment

Choose a reason for hiding this comment

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

I'm trying to debug the "scrollableElement" malformed id error, but can't reproduce it. Still checking it

@wswebcreation wswebcreation added the PR: Bug Fix 🐛 PRs that contain bug fixes label Jan 2, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 2, 2025

Open in Stackblitz

eslint-plugin-wdio

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

@wdio/allure-reporter

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

@wdio/appium-service

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

@wdio/browser-runner

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

@wdio/browserstack-service

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

@wdio/cli

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

@wdio/concise-reporter

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

@wdio/config

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

@wdio/cucumber-framework

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

@wdio/dot-reporter

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

@wdio/firefox-profile-service

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

@wdio/globals

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

@wdio/jasmine-framework

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

@wdio/json-reporter

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

@wdio/junit-reporter

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

@wdio/lighthouse-service

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

@wdio/local-runner

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

@wdio/logger

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

@wdio/mocha-framework

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

@wdio/protocols

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

@wdio/repl

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

@wdio/reporter

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

@wdio/runner

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

@wdio/sauce-service

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

@wdio/shared-store-service

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

@wdio/smoke-test-cjs-service

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

@wdio/smoke-test-reporter

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

@wdio/smoke-test-service

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

@wdio/spec-reporter

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

@wdio/static-server-service

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

@wdio/sumologic-reporter

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

@wdio/testingbot-service

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

@wdio/types

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

@wdio/utils

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

@wdio/webdriver-mock-service

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

webdriver

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

webdriverio

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

commit: 7603516

@wswebcreation wswebcreation marked this pull request as ready for review January 2, 2025 18:51
@wswebcreation
Copy link
Member Author

I'm trying to debug the "scrollableElement" malformed id error, but can't reproduce it. Still checking it

This doens't seem to be an issue, but the code of the user is. So stopping my investigation. PR is ready to review :D

// - left
// of the element. These positions will contain the x and y coordinates on where to put the finger
const { x, y, width, height } = await browser.getElementRect(scrollableElement?.elementId)
const { x, y, width, height } = await browser.getElementRect(await scrollableElement?.elementId)
Copy link
Member Author

Choose a reason for hiding this comment

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

@christian-bromann

Hmm, might this fix the error @Dinh246 was talking about? I first tested it on my machine with the old code and there was no issue. Then after running the adjusted appium-boilerplate code on GHA+Sauce I got the same error with the current webdriveriopackage, see https://github.com/webdriverio/appium-boilerplate/actions/runs/12587209761/job/35082582798#step:9:221

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm, it might be, it's now also fails on iOS, see https://github.com/webdriverio/appium-boilerplate/actions/runs/12587209746/job/35082583004#step:7:254

This seems to be working on my machine due to the M3 and not on slower machines. So this fix might solve the issue

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.

This makes sense to me 👍

@christian-bromann christian-bromann merged commit 4bc6272 into main Jan 2, 2025
@christian-bromann christian-bromann deleted the ws/fix-14019 branch January 2, 2025 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Bug Fix 🐛 PRs that contain bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[🐛 Bug]: Swipe method will not recognize scrollableElement if user pass it as variable and also type error

2 participants