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

147
Visualizações
Inspect the browser during a protractor test

I'm trying to write a protractor test with some mocked backend calls. I have one test which is working up to a point and then failing and I just can't seem to inspect it to find out why.

I really want to stop the browser closing so that I can inspect the page, ideally the network tools but at least the html. The browser closes at the end of the test though so I just can't get a look at it. So for sake of argument my test might be like this

describe('a new set of tests', function () {
        beforeEach(function () {
            browser.clearMockModules();
        });

        it('lets do a test, function () {

            browser.addMockModule('accountMockModule', mockInjector.injectAccount,
                dataMocks.mockedAccount,
                dataMocks.mockedAccountDetails);

            login();

            expect(browser.getCurrentUrl()).toMatch('/account');
            
            //works
            someDetails.isDisplayed();
            expect(someDetails.isDisplayed()).toBeTruthy();
            
            accountPage.clickAccountDetails(dataMocks.mockedAccount.id);

            //works
            someDetails.isDisplayed();
            expect(someDetails.isDisplayed()).toBeTruthy();
            expect(browser.getCurrentUrl()).toMatch('/accountDetails');

            accountPage.addressDetailsLink.click();

            //fails
            expect(browser.getCurrentUrl()).toMatch('/accountAddressDetails');
        });
    });

I want to stop the browser closing either before the fails (and comment out where it fails) or after. I tried adding a wait loop but it seems to process it before the test runs and then run the test. Is there a way to leave the browser up & available to inspect for a while ?

about 4 years ago · Juan Pablo Isaza
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