hello
I am trying to read online xml sitemap , and test each url that appear there. I need every url in a different 'it' section, so it wouldn't fail the rest of the test if one of the url fail.I guess because the urls from an online xml file its make the error. Because when i tried it on a different array of urls worked. any solutions?:)
describe('betting-guides', () => {
// // initialize the url array
let urls = []
before(async () => {
// getch the sitemap content
const response = await cy.request('XMLFileName.xml')
// convert sitemap xml body to an array of urls
urls = Cypress.$(response.body)
.find('loc')
// map to a js array
.toArray()
// get the text of the <loc /> node
.map(el => el.innerText)
})
it('' , ()=> {
urls.forEach((url) => {
// it('should succesfully load each url in the sitemap in ' + url, ()=> {
cy.pargraphHasMoreThan100words(url)
// })
})
})