-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
I have tried ti use your code but i got error links.map is not a function.
I rewritten code as
`describe('broken link test', function() {
it('should check the page for broken links', async function () {
browser.url('/status_codes/200');
// get all the links on the page
const links = $$('a');
const urls = (await links).map(link => link.getAttribute('href'));
const requests = urls.map(url => fetch(url));
const responses = await Promise.all(requests);
const statusCodes = responses.map(response => response.status);
statusCodes.forEach(statusCode => {
expect(statusCode).to.be.below(400);
})
});
});`
but now i take error "Only absolute URLs are supported"
Can you help me debug this code for right work?
Thanks in advance!
Metadata
Metadata
Assignees
Labels
No labels