feat: add two new mobile flags#13905
Conversation
- update docs
|
Closes #13887 |
eslint-plugin-wdio
@wdio/appium-service
@wdio/allure-reporter
@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/utils
@wdio/types
@wdio/webdriver-mock-service
webdriver
webdriverio
commit: |
- revert and fix tests
christian-bromann
left a comment
There was a problem hiding this comment.
One tiny comment. I prefer to keep logic that don't use any class context outside of the class so it makes it easier to move them around
| /** | ||
| * Keep track of the context to which we switch | ||
| */ | ||
| if (this.#browser.isMobile && event.command === 'switchContext') { |
There was a problem hiding this comment.
We don't have to do it in this PR but we should incorperate the Appium Bidi event that notifies us on context changes appium/appium#20741
There was a problem hiding this comment.
Let's do that later. I believe we also need to check with the Appium team on how to get the versions of the drivers. They are now not exposed and some features, like the bidi support are only in the latest. BS for example is still running Appium 1 as a default 🤦
Thanks, changed it. Hope this is better |
This PR adds new session flags called
isNativeContextandmobileContext. These flags will tell you ifIt also reverts the extra WebDriver-call that was added to the
implicitWaitadnd use theisNativeContextflagThey will automatically change if the context changes
Given this config:
You can access these flags like all other (mobile) flags in your test like so:
Because it's attached to the
contextManagerit will also update the status if you do this based on the below configProposed changes
Types of changes
Checklist
Backport Request
//: # (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