webdriverio / webdriverio/expect-webdriverio

Expect reads all instances in multiremote mode

Open
#1,966 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
86
Forks
61
Avg merge
19h 12m
Merged PRs (30d)
15

Description

For some reason, when using multiremote, expect will fail since it will seem to read #my-button selector from both browser instances and not focus only on the current instance.

[0-0] Error in "Expect"
Error: Expect  to have text

Expected: "My Button"
Received: ["My Button", "My Button"]
    at Context.<anonymous> (file:///home/john/Desktop/wdio-multiremote-expect/tests/expect.js:6:32)

Git repo example...
https://github.com/trymeouteh/wdio-multiremote-expect

To reproduce...

git clone https://github.com/trymeouteh/wdio-multiremote-expect
cd wdio-multiremote-expect
npm i
chmod +x ./test.sh
./test.sh

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Clone the linked wdio-multiremote-expect repository and run its test.sh reproduction. Start with tests/expect.js at the reported failing line and trace how the #my-button selector is evaluated in multiremote mode. Done means the expectation reads only the current browser instance and no longer receives duplicate text values.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.