Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

157
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda