You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
The text was updated successfully, but these errors were encountered:
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');
});`
but now i take error "Only absolute URLs are supported"
Can you help me debug this code for right work?
Thanks in advance!
The text was updated successfully, but these errors were encountered: