#Why does Puppeteer not save new textarea value?

1 messages · Page 1 of 1 (latest)

soft breach
#

If I use .type to insert the text (5,000+ chars of Lorem ipsum, same line) into the textarea, I get Apify status messages throwing cpuOverload true.

Which is why I'm trying to set .value.

nova oceanBOT
#

@soft breach just advanced to level 5! Thanks for your contributions! 🎉

soft breach
#

Solved.

This works...

  1. I had not .clicked inside the <textarea>.
    Whilst I had .clicked the <input> field prior to .typeing into it, I had not done this with the <textarea> - because I wasn't using .type there; I was having to set the `.values.

  2. In addition to that, for good measure, I .click Back in to the <input> field.

  3. Also, I `.types an arbitrary value.

I think it was the clicks. Without having clicked the <textarea>, only the apparent .value was getting set.

await page.click('label[data-test-name=long-description-textarea] textarea')
await setSelectVal('label[data-test-name=long-description-textarea] textarea', bodytext)
await page.click('label[data-test-name=long-description-textarea] textarea')
await page.type('label[data-test-name=long-description-textarea] textarea',' ')

await page.click('label[data-test-name=video-name-input] input')