0

When I set baseUrl and try to visit URL, the content of the URL is not getting loaded.

Here is config file.

const { defineConfig } = require("cypress");

module.exports = defineConfig({
  projectId: 'qu3jox',
  e2e: {
    baseUrl : 'https://dxplus.mom.gov.sg',
    pageLoadTimeout : 60000,
    // modifyObstructiveCode: false,
    chromeWebSecurity: false,
    defaultCommandTimeout: 20000  
  }
});

Here is the spec file :

describe("Verify identify header",() => {
  before(() => {
    cy.visit("/")
  })

  it("verify that How to identify",() => {
    cy.get(elementSelector.masterHeadLink).should('be.visible').contains(' How to identify ').click()
  })
})

Here is the Output: Content of the site is not getting loaded

enter image description here

Console log :

enter image description here

Network status :

enter image description here

1 Answers1

0

If the above method doesn't work try to use:

cy.visit(Cypress.config().baseUrl)

OR

cy.visit(Cypress.config('baseUrl'))

To eliminate the "integrity" SHA edit the config below:

{
    "experimentalSourceRewriting": true
}
pr96
  • 994
  • 5
  • 17