Skip to content

Issue 657 #992

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

Open
wants to merge 1 commit into
base: ws/rewrite-core
Choose a base branch
from

Conversation

P-Courteille
Copy link

@P-Courteille P-Courteille commented Jul 19, 2025

📝 Description

This PR is a fix for issue 657.


🐛 Bug

In the previous version of the code, the functions was added first to each instance of the browser and then to the browser object.

The problem is, @wdio\utils\build\index.js (line 388) already add the command to each instance so the commande added to each instance was overwritten by the one containing the loop of each instance.

→ Resulting in the issue 983

This issue was also the reason of the loop from issue 657, because each instance called the multi remote version of the command when we use:
browserInstance[commandName].apply(browserInstance, args)


🛠️ Solution

Change the addCommand order for Multi Remote

  • first, add the command to Browser in a Multi Remote version (with a loop to do the function in each instance)
  • then, add the command to each instance in a Single Remote version
    For ocr-service

Copy link

changeset-bot bot commented Jul 19, 2025

🦋 Changeset detected

Latest commit: 35724ce

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@wdio/image-comparison-core Major
@wdio/visual-service Major
@wdio/visual-reporter Patch
@wdio/ocr-service Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@P-Courteille P-Courteille changed the base branch from main to ws/rewrite-core July 19, 2025 16:28
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.

1 participant