TenKeyLabs / dappwright

🏌🏼‍E2E testing for dApps using Playwright + MetaMask & Coinbase Wallet
https://www.npmjs.com/package/@tenkeylabs/dappwright
Other
82 stars 21 forks source link

dappwright.bootstrap hangs in metamask view; coinbase works #321

Closed Jo-Chris closed 2 months ago

Jo-Chris commented 5 months ago

Describe the problem

EDIT: it works flawlessly with CoinbaseWallet, only Metamask is stuck.

After calling dappwright.bootstrap, it stops in the settings section. How to go from here? The configuration is from the docs.

image

inside context: ()


    const [wallet, _, context] = await dappwright.bootstrap("", {
      wallet: "metamask",
      version: MetaMaskWallet.recommendedVersion,
      seed: MNEMN_PHRASE,
      headless: false,
      showTestNets: true,
    });

    console.log("--- This is never reached");
    await wallet.addNetwork({
      networkName: "Sepolia",
      rpc: "https://sepolia.gateway.tenderly.co",
      chainId: 11155111,
      symbol: "ETH",
    });
    await use(context);
  },

System:

osis commented 5 months ago

Hello! That's an odd spot for that to get stuck. Can you run playwright in debug mode to see which element/instruction it's waiting for? Also, did you change the targeted MetaMask version?

dlaxcess commented 5 months ago

Hi, I've got the same issue, and when i try to run playwright in debug mode, I get stucked earlier just after metamask installation (before account creation).

in the report, problem seems to be here: locator.click(.tab-bar__tab >> internal:has-text="Advanced"i)— ../../node_modules/.pnpm/@tenkeylabs+dappwright@2.8.2_playwright-core@1.42.1/node_modules/@tenkeylabs/dappwright/src/wallets/metamask/setup/setupActions.ts:14

dlaxcess commented 5 months ago

Hi @osis It seems to be linked solely to Metamask... using the CoinbaseWallet extension works perfectly.

osis commented 2 months ago

this should be fixed in the latest version.