Issue 1:
System info

Playwright Version: [v1.34.2]

Operating System: [All]

Browser: [Chromium,Firefox,Webkit]

Other info:[Not working with Chromium & Webkit, Working with Firefox]

Source code

test.only("verify Klaviyo integration Modified", async ({ page }) => {
let help:string = "";
await page.route(
"https://a.klaviyo.com/api/track",
async (route, request) => {
const networkRequests:string = request.postData()!;
help = networkRequests;
await route.continue();
});
await page.goto(
"https://rohitgupta.wingified.com/klaviyo1.html?id=" + accountId,{
waitUntil:'networkidle'
}
);
console.log(help); //network request details
const klaviyoCookies = await page.context().cookies();
expect(JSON.stringify(klaviyoCookies)).toContain("_vis_opt_exp_35_combi");
expect(help.includes('"Exp_name":"KLAVIYO - DO NOT DELETE"')).toBeTruthy();
expect(help.includes('"Var_name"')).toBeTruthy();
});

Config file

import baseConfig from "vwo-playwright-seed/lib/config/base.conf";

const config = baseConfig.config;
config["use"]["baseURL"] = process.env.BASE_URL || "https://app.vwo.com/";
config["projects"] = [
{
name: "Chrome",
use: {
browserName: "chromium",
},
},
{
name: "Firefox",
use: {
browserName: "firefox",
},
},
];
export default config;

Steps

[Run the test]

[npx playwright test specs/Integration.Spec.ts --project=Chrome]

Expected

-----------------------------18815464218261179702781698581
Content-Disposition: form-data; name="data"

{"event":"VWO","token":"TSR5n6","properties":{"Exp_name":"KLAVIYO - DO NOT DELETE","Var_name":"Variation-1","$use_ip":true,"$is_session_activity":true},"customer_properties":{"$exchange_id":"UKGnAHMG7opQKheXx_c9e6AApF9oEeD8PQQ_Yt1qyOJXWthcyBDClUET7ANQ3krL.TSR5n6","$referrer":{"ts":1685039184,"value":"","first_page":"https://rohitgupta.wingified.com/klaviyo1.html?id=541364"},"$last_referrer":{"ts":1685039184,"value":"","first_page":"https://rohitgupta.wingified.com/klaviyo1.html?id=541364"}}}
-----------------------------18815464218261179702781698581--

-----------------------------18815464218261179702781698581
Content-Disposition: form-data; name="data"

{"event":"VWO","token":"TSR5n6","properties":{"Exp_name":"KLAVIYO - DO NOT DELETE","Var_name":"Variation-1","$use_ip":true,"$is_session_activity":true},"customer_properties":{"$exchange_id":"UKGnAHMG7opQKheXx_c9e6AApF9oEeD8PQQ_Yt1qyOJXWthcyBDClUET7ANQ3krL.TSR5n6","$referrer":{"ts":1685039184,"value":"","first_page":"https://rohitgupta.wingified.com/klaviyo1.html?id=541364"},"$last_referrer":{"ts":1685039184,"value":"","first_page":"https://rohitgupta.wingified.com/klaviyo1.html?id=541364"}}}
-----------------------------18815464218261179702781698581--

[Describe expected behavior]

This should be expected behaviour & all assertion should get passed

This expected result is with firefox browser.

Actual

Even request is not getting intercept in chrome browser same issue with the webkit.

[Describe actual behavior]

Assertions are getting failed as they are not intercepted with the route method with chromium.

Issue 2:
Context:

System:

OS: Windows 10 10.0.19043

Binaries:

Node: 12.13.1 - C:\Program Files\nodejs\node.EXE

Yarn: 1.19.1 - ~\AppData\Roaming\npm\yarn.CMD

npm: 6.14.2 - C:\Program Files\nodejs\npm.CMD

Languages:

Bash: 4.4.20 - C:\WINDOWS\system32\bash.EXE

npmPackages:

playwright: ^1.10.0 => 1.10.0 / tip-of-tree

Code Snippet

Help us help you! Put down a short code snippet that illustrates your bug and

that we can run and debug locally. For example:

const playwright = require('.');

(async () => {
const browser = await playwright.webkit.launch();
const page = await browser.newPage();

await page.goto('http://example.com');

const requestPromise = page.waitForRequest(() => true);
const [request] = await Promise.all([
page.waitForRequest("**/*"),
page.evaluate(() => {
var file = new File(['file-contents'], 'filename.txt');

fetch('/data', {
method: 'POST',
headers: {
'content-type': 'application/octet-stream'
},
body: file
});
})
])
console.info('request.method()', request.method());
console.info('request.url()', request.url());
console.info('request.headers()', request.headers());
console.info('request.postData()', request.postData());
})();

Describe the bug

the request.postData() contains null in Chromium and WebKit. In Firefox it's filled.