Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

227
Visualizações
Playwright getting started using existing browser - unclear what to do

I want to write tests for an existing web application (for example vanilla todo mvc) with playwright. So i started playwright getting started with

npm init playwright@latest new-project

But it does not work for me because the installation of browsers fails:

Downloading browsers (npx playwright install)…
Failed to install browsers

I quess that our corporate firewall prevents to download browsers. Luckily playwright also offers to use existing browsers

current Playwright version will support Stable and Beta channels of these browsers (chrome, msedge)

But it is unclear to me how i can create a playwright project and where to put the given configuration lines

// @ts-check

/** @type {import('@playwright/test').PlaywrightTestConfig} */
const config = {
  use: {
    channel: 'chrome',
  },
};

module.exports = config;

Questions

  1. What do i have to do to create a playwright project using existing browser?
  2. Where do i have to put the provided config lines?
  3. How do i run the tests?
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

In your playwright.config.ts file (or js, it does not matter on this regard) you should see those lines, which are nothing but your playwright configuration. In "use", add 'chrome' as channel and remove any projects you may have specified in your config. It should be fine. Your config file with a very minimal configuration could look something like this:

import type { PlaywrightTestConfig } from '@playwright/test'

const config: PlaywrightTestConfig = {
    testDir: './tests',
    timeout: 30 * 1000,
    expect: {
        timeout: 5000
    },
    use: {
        channel: 'chrome'
    }
};

export default config;
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda