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

[Bug]: playwright electron routeFromHAR not work #33744

Open
cheungseol opened this issue Nov 23, 2024 · 0 comments
Open

[Bug]: playwright electron routeFromHAR not work #33744

cheungseol opened this issue Nov 23, 2024 · 0 comments

Comments

@cheungseol
Copy link

Version

1.45.0-next

Steps to reproduce

  1. There is a number on the webpage in electron window, and the number is get from the api /adx/v1/demo/account/info

  2. in the example2.har, the value of the number from api response /adx/v1/demo/account/info is 24000

  3. code

test('test', async ({ page }) => {

  const electronApp = await electron.launch({
    executablePath,
  });

  const window = await electronApp.firstWindow();

    await window.routeFromHAR("./example2.har", {
        notFound: "fallback",
        url: /.*\/adx\/v1\/demo\/account\/info\?.*/i,
        update: false,
    });


  await window.goto('https://xxxxx')

});

Expected behavior

the number on the webpage in electron window should be the same as the api response /adx/v1/demo/account/info in example2.har

Actual behavior

Although in the network tab , the number returned from api is same as the api response /adx/v1/demo/account/info in example2.har.

But the number on the webpage in electron window is actually different from the api response /adx/v1/demo/account/info in example2.har.

Additional context

No response

Environment

System:
    OS: macOS 14.5
    CPU: (12) arm64 Apple M2 Pro
    Memory: 74.38 MB / 16.00 GB
  Binaries:
    Node: 20.15.0 - ~/.nvm/versions/node/v20.15.0/bin/node
    npm: 10.7.0 - ~/.nvm/versions/node/v20.15.0/bin/npm
  IDEs:
    VSCode: 1.95.1 - /usr/local/bin/code
  Languages:
    Bash: 3.2.57 - /bin/bash
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

1 participant