fix(webdriverio): handle closeWindow for WDIO classic when no window is open#14050
Conversation
|
@christian-bromann I have made the changes as per your suggestions, PTAL. |
eslint-plugin-wdio
@wdio/appium-service
@wdio/allure-reporter
@wdio/browser-runner
@wdio/browserstack-service
@wdio/cli
@wdio/concise-reporter
@wdio/cucumber-framework
@wdio/config
@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
webdriver
webdriverio
commit: |
|
@HannaTarasevich this fix should work to resolve the since the window is being closed as soon as it is opened. You can try using above |
|
@navin772 |
|
I am getting the following error with this: Basically the command to open the window fails - as expected since the driver closes the session as no windows are around anymore. I am not sure if this is a "solution" to the problem. I rather return a more conrete error message to the user notifying that they closed all windows. What do you all think should be the right behavior? |
|
This bug was only about a new issue with "malformed," which has been fixed. The "invalid session id" error was expected and has always worked this way. Therefore, I wouldn’t address it within the scope of this bug. In general, I agree that the message could be improved, but I believe it is quite descriptive as it is now. |
…w is open (#14050) * fix `closeWindow` for WDIO classic * log error instead of spawning new window as per W3C spec * Update packages/webdriverio/src/session/context.ts --------- Co-authored-by: Christian Bromann <git@bromann.dev>
Proposed changes
Fixes #14047
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