Skip to content

Argument of type 'Browser' is not assignable to parameter of type 'BrowserBase'. #1052

Description

@BlackPoretsky

Verify latest release

  • I verified that the issue exists in the latest Hermione release

Hermione version

8.23.1

Last Hermione version that worked

No response

Which area(s) of Hermione are affected? (leave empty if unsure)

No response

Link to the code that reproduces this issue or a replay of the bug

No response

Reproduction steps

  1. pnpm i -D @testing-library/webdriverio
  2. import { setupBrowser } from '@testing-library/webdriverio';
    
    export default {
      prepareBrowser(browser) {
        setupBrowser(browser);
      },
      // other
     }
    

Actual Behavior

The object passed as an argument to the prepareBrowser function, which has the type WebdriverIO.Browser, does not extend from BrowserBase from @testing-library/webdriverio. This discrepancy results in an error when attempting to pass the object to the setupBrowser function, which expects an argument of a type that extends BrowserBase.

In the documentation, it is simply stated that the browser object is passed to setupBrowser.

I haven’t written any tests yet, but this might cause issues because the BrowserBase type has required fields that are missing in WebdriverIO.Browser. This will likely result in problems.

Expected Behavior

The WebdriverIO.Browser object is expected to inherit from BrowserBase.

Which Node.js version are you using?

20.10.0

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions