[wptrunner] Generalize WebDriver-based print-reftest implementation (#48238)
Most of the implementation is lifted verbatim from an existing
chromedriver
one, except the nonstandard CDP call in render_as_pdf()
is replaced by an equivalent one to WebDriver's "print page" 0.
shrinkToFit
is actually a WebDriver parameter, not a CDP one, so this
PR also fixes some incorrectly scaled screenshots 1.