-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
[Feature] how to get file by route request Intercept when form file upload #16579
Comments
@nappinglady I don't think I follow the question. What exactly do you want to do? |
[>] @nappinglady I don't think I follow the question. What exactly do you want to do? @aslushnikov thanks for reply <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,height=device-height">
<title>test playwright intercept file</title>
<style>::-webkit-scrollbar{display:none;}html,body{overflow:hidden;height:100%;margin:0;}</style>
</head>
<body>
<form enctype="multipart/form-data" action="http://localhost:8004/Upload/Upload" method="post">
<input type="file" name="file"/>
<input type="text" name="name"/>
<input type="submit" value="上传"/>
</form>
</body>
</html> then i want to get file by intercept like this test.describe('lpp', async () => {
await test('lpp',async ({ page }) => {
await page.goto("file:///E:/study/antv/uploadfile.html");
page.route(/.*localhost.*/g,async(route,request)=>{
console.log(request)
console.log(route)
console.log(request.postData());
console.log(await request.headersArray());
console.log(request.postDataBuffer());
await route.continue();
console.log(await (await request.response())?.json());
})
await page.waitForTimeout(100000);
});
}); i cant get file by request or route |
|
how to get file by route request Intercept when form file upload?
cant frind in request method
The text was updated successfully, but these errors were encountered: