问题
I want to run e2e tests on mhtml files, i.e., fill out a form.
Viewing and extracting data works really well on the mhtml file, but I cannot fill out any input
fields (neither manually nor via puppeteer). You can try it out with this mhtml file I created from the StackOverflow login page.
<input name="firstName" value="">
This is how I open the snapshot:
browser = await puppeteer.launch()
page = await browser.newPage()
const snapshotPath = join('file://', __dirname, 'mysnapshot.mhtml')
await page.goto(snapshotPath)
Is there a way to fill in inputs in mhtml files or is it only possible to view them in Chrome?
Converting the snapshot to HTML works, but I want to avoid that if possible.
来源:https://stackoverflow.com/questions/61800030/fill-input-in-mhtml-file-opened-in-browser