Skip to content

HTTP Status code assertion #1040

Answered by mdmintz
abdurraheemj asked this question in Q&A
Oct 28, 2021 · 1 comments · 6 replies
Discussion options

You must be logged in to vote

Hi @abdurraheemj There are several SeleniumBase methods that you could use for this:

self.get_link_status_code(link)
self.assert_link_status_code_is_not_404(link)
self.assert_no_404_errors()  # For all links on the current page
self.print_unique_links_with_status_codes()  # For current page
self.assert_equal(first, second)

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@mdmintz
Comment options

@abdurraheemj
Comment options

@mdmintz
Comment options

@abdurraheemj
Comment options

@mdmintz
Comment options

Answer selected by mdmintz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants