Forum Discussion

leahey's avatar
leahey
Occasional Contributor
11 years ago
Solved

Get actual page source, including comments?

Greetings, 



How best to get access to the entirety of a web page's source, including non-html elements prior to the <html> tag? 



We're embedding some comments into our page source that our testers need to access for conditional page validation. How best to get access to those comments? 

Everything I've seen only loads the document source post-parse, which leaves out the comments, obviously. 



e.g.:



<!-- MeaningfulComment = True -->

<!DOCTYPE html>

<html>

  <head>

etc.