leahey
11 years agoOccasional Contributor
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.
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.
Hi Robert,
Last time, I missed the fact that the comments are located outside the html tag in your case.
I don't see other options except saving the web page to html or txt and reading the first lines in the file.
Saving the page should be possible via Page("*").Keys("^S").