Rayrun
← Back to Discord Forum

How to check if a specific file url returns 200 and if its headers are correct

Hi! I am writing this test, where I check whether href attributes of specific anchors link to an existing file. I do not want to click on those links, just issue a HEAD request to them so that I can check a proper header being set back to me. What is the cannonical way of doing it in Playwright?

This thread is trying to answer question "What is the canonical way of testing href attributes of specific anchors to ensure they link to an existing file using Playwright?"

2 replies
TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].