Skip to content
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

check if browser is W3C instead of Android #3414

Merged

Conversation

mikk150
Copy link
Contributor

@mikk150 mikk150 commented Sep 19, 2022

Motivation/Description of the PR

My first implementation to this was stupid, this is way better one

Applicable helpers:

  • WebDriver
  • Puppeteer
  • Nightmare
  • REST
  • FileHelper
  • Appium
  • Protractor
  • TestCafe
  • Playwright

Applicable plugins:

  • allure
  • autoDelay
  • autoLogin
  • customLocator
  • pauseOnFail
  • coverage
  • retryFailedStep
  • screenshotOnFail
  • selenoid
  • stepByStepReport
  • stepTimeout
  • wdio
  • subtitles

Type of change

  • 🔥 Breaking changes
  • 🚀 New functionality
  • 🐛 Bug fix
  • 📋 Documentation changes/updates
  • ♨️ Hot fix
  • 🔨 Markdown files fix - not related to source code
  • 💅 Polish code

Checklist:

  • Tests have been added
  • Documentation has been added (Run npm run docs)
  • Lint checking (Run npm run lint)
  • Local tests are passed (Run npm test)

@kobenguyent
Copy link
Collaborator

Hi @mikk150 so this check would be sufficient for both android and iOS right? Just out of curiosity.

@mikk150
Copy link
Contributor Author

mikk150 commented Sep 20, 2022

Hi @mikk150 so this check would be sufficient for both android and iOS right? Just out of curiosity.

if webdriverio reports iOS as W3C browser(Which it should, because it is really Appium), then I do not see why not

@Arhell Arhell requested a review from DavertMik September 20, 2022 09:08
@DavertMik
Copy link
Contributor

Thanks!

@DavertMik DavertMik merged commit 2dd7246 into codeceptjs:3.x Sep 25, 2022
nlespiaucq pushed a commit to nlespiaucq/CodeceptJS that referenced this pull request Oct 27, 2022
@mjalav
Copy link

mjalav commented Dec 11, 2024

I did check this change with codeceptjs v3.6.7 and seems it's not working. I have native android app and when I open the app and check "this.browser.isW3C" it's false and "this.browser.isMobile" is true. base on new condition it will do touchClick which gave me error:
ERROR webdriver: WebDriverError: The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource when running "touch/click" with method "POST" and args "{"element":"00000000-0000-010f-ffff-ffff00000031"}"

I reverted your code changes locally and I see it perform element click action which pass my test.

My question is about how "this.browser.isW3C" should drive a decision for touchClick or elementClick. seems like unrelated and make error.
Would you please reconsider this change?
(Fail) New changes: const clickMethod = this.browser.isMobile && !this.browser.isW3C ? 'touchClick' : 'elementClick';
(pass) Old changes: const clickMethod = this.browser.isMobile && this.browser.capabilities.platformName !== 'android' ? 'touchClick' : 'elementClick';

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.

5 participants