Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

WebDriverError: unknown error: cannot determine loading status from unknown error: unhandled inspector error: {"code":-32000,"message":"Inspected target navigated or closed"} #5347

@allbigbopper

Description

@allbigbopper

Hi!
We started experiencing this problem on latest chrome browser versions

WebDriverError: unknown error: cannot determine loading status
from unknown error: unhandled inspector error: {"code":-32000,"message":"Inspected target navigated or closed"}
  (Session info: chrome=78.0.3904.87)
    at Object.throwDecodedError (/Users/allamudruk/Projects/support-site-frontend/node_modules/selenium-webdriver/lib/error.js:550:15)
    at parseHttpResponse (/Users/allamudruk/Projects/support-site-frontend/node_modules/selenium-webdriver/lib/http.js:542:13)
    at Executor.execute (/Users/allamudruk/Projects/support-site-frontend/node_modules/selenium-webdriver/lib/http.js:468:26)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  • Node Version: 10.13.0
  • Protractor Version: 6.0.0
  • Angular Version: ``
  • Browser(s): chrome=78.0.3904.87
  • Operating System and Version macOS Mojave 10.14.6
module.exports = {
  capabilities: {
    browserName: 'chrome',
    build: 'cucumber-js-browserstack',
  },
  framework: 'custom',
  frameworkPath: require.resolve('protractor-cucumber-framework'),
  specs: ['../tests/features/*.feature'],
  cucumberOpts: {
    require: ['../tests/step_definitions/*.js', '../tests/features/support/*.js'],
    tags: false,
    profile: false,
    'no-source': true,
    format: ['json:tests/report/cucumber-report.json', 'rerun:protractor_output/rerun.txt'],
  },
  theme: 'bootstrap',
  jsonFile: path.resolve('tests/report/cucumber-report.json'),
  output: path.resolve('tests/report/cucumber-report.html'),
  reportSuiteAsScenarios: true,
  launchReport: true,
};

onPrepare: async () => {
    await browser.waitForAngularEnabled(false);
  },
Before({timeout: TIMEOUT}, async () => {
  await browser.driver.get(`${browser.logoutUrl}/logout?continue=${browser.baseUrl}`);
  await browser.wait(protractor.ExpectedConditions.urlContains(`${browser.baseUrl}/`), 20000);
  await browser.driver.get(browser.baseUrl);
  await browser.driver.manage().addCookie({
    name: 'abcdef',
    value: 'true',
    domain: '.com',
  });
});

It almost always fails on first page load or login step

await formPage.goto()
await loginPage.addUsername(freeUsername);
await loginPage.addUserPassword(password);
return await loginPage.clickLoginButton();
async goto() {
    return await browser.get(this.url, this.timeout.xl);
  }

async addUsername(username) {
    await this.waitForElementAvailable(this.usernameField, this.timeout.l);
    await this.usernameField.clear();
    return await this.usernameField.sendKeys(username);
  }

  async addUserPassword(password) {
    await this.waitForElementAvailable(this.passwordField, this.timeout.l);
    await this.passwordField.clear();
    return await this.passwordField.sendKeys(password);
  }

  async clickLoginButton() {
    await this.waitForElementAvailable(this.loginButton, this.timeout.l);
    return await this.loginButton.click();
  }

async clickElement(locator) {
    await browser.executeScript('document.activeElement.blur();');
    return await locator.click().then(
      async promise => {
        return promise;
      },
      async err => {
      console.log('Element is not clickable at point. Other element would receive the click');
      }
    );
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions