Testing text input with Galata


With CodeMirror 5, it was possible to do something like

  await page.locator('div[role="main"] >> textarea')
    .fill(`from IPython.display import display, Markdown
/* ...*/`

However, the textarea element has been removed from CodeMirror 6, and I am wondering how I can achieve the same goal. Selecting the element with contenteditable=true does not work since it’s a div, not an input or textarea.

I think I found what I need, I will try with the type function

That worked like a charm.