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

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

Open
1 task
BlackPoretsky opened this issue Jan 10, 2025 · 0 comments
Open
1 task
Assignees

Comments

@BlackPoretsky
Copy link

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

@shadowusr shadowusr self-assigned this Jan 13, 2025
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

No branches or pull requests

2 participants