You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm writing a game and testing requires interaction between two players.
I'm using Playwright + Synpress for the tests, and I'm wondering if it's possible to setup multiple windows, each with its own metamask configuration. I should note I'm using shared state for the tests (that run in the same window)
I think in theory, it shouldn't be an issue, e.g. one can use Playwright to quite easily get multiple context. However, I'm not too sure how to retool the Synpress fixtures to make things work.
However, in practice my naive attempts have failed, for instance I'm getting this on the second window:
Error: [switchToMetamaskNotification] Max amount of retries to switch to metamask notification window has been reached. It was never found.
The second window spawns successfully in headed mode, but it doesn't the get the metamask initialization that the first window gets and consequently connecting the dapp fails.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm writing a game and testing requires interaction between two players.
I'm using Playwright + Synpress for the tests, and I'm wondering if it's possible to setup multiple windows, each with its own metamask configuration. I should note I'm using shared state for the tests (that run in the same window)
I think in theory, it shouldn't be an issue, e.g. one can use Playwright to quite easily get multiple context. However, I'm not too sure how to retool the Synpress fixtures to make things work.
However, in practice my naive attempts have failed, for instance I'm getting this on the second window:
Error: [switchToMetamaskNotification] Max amount of retries to switch to metamask notification window has been reached. It was never found.
The second window spawns successfully in headed mode, but it doesn't the get the metamask initialization that the first window gets and consequently connecting the dapp fails.
Beta Was this translation helpful? Give feedback.
All reactions