• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

333
Views
How to insert code in monaco editor using Playwright?

I'm new to Playwright and I am trying to test a feature containing monaco editor, and couldn't find anything related in Playwright docs and forums.

This is my test:

async ({ page }) => {
    const testPage= new TestPage(page);

    await testPage.navigateTo();
    //dosomething
    await page.waitForSelector(#monaco-editor-selector);
    //Paste a script in monaco editor
}

Please help!

about 3 years ago · Juan Pablo Isaza
1 answers
Answer question

0

const { test,expect } = require('@playwright/test')

test('Login', async({ page }) => {
await page.goto('https://URL')
await expect(page).toHaveTitle('someTITLE')
await page.click('selector'); //if need the step
await page.fill('#monaco-editor-selector', 'YOUR_CODE');
})

Try this - maybe it helps

about 3 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error