Rayrun
← Back to Discord Forum

paste text in textarea

HI , what is the best way to paste text in textbox n playrwright? any example?

This thread is trying to answer question "What is the best way to paste text in a textbox using Playwright?"

13 replies

you can use fill() or type() on a locator

fill doesnt work for me

which exception it throws?

waiting for getByTestId('free-text') locator resolved to <div data-testid="free-text" class="MuiFormControl-ro…>…</div> elementHandle.fill("free-text") waiting for element to be visible, enabled and editable Element is not an <input>, <textarea> or [contenteditable] element

can you try with type() once?

thank you!

it helped!

there is away to paste in one time without waiting for the long text to be wrriten?

@tall0763: yup. that is the fill() you are talking about!

yup. that is the fill() you are talking about!

cool this is also work now.

@tall0763 how did you get it working??

i change the element to be in input and not div

Great! Thanks for sharing

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].