My only thoughts would be the pref flip that seems to be ruled out at this point, or that you're trying to shoot an about:[SOMETHING] page for which we disable screenshots.
Otherwise, file an issue: https://github.com/mozilla-services/screenshots/issues
We're triaging in an hour or so :)
# driver is a Firefox driver
body = driver.find_element_by_tag_name('body')
screenshot = body.screenshot_as_base64 # png bytes- a lot of (visible) elements are missing
- the screenshot is still cropped to whatever viewport is used
This worked for me:
from selenium.webdriver import Firefox
from selenium.webdriver.firefox.options import Options
geckodriver_path = '/usr/local/bin/geckodriver'
options = Options()
options.add_argument('-headless')
driver = Firefox(executable_path=geckodriver_path, firefox_options=options)
url='https://news.ycombinator.com/item?id=16576015'
driver.get(url)
driver.save_screenshot('./hn.png')Is there a way to programmatically trigger this feature or sequence?
I have tried this feature when it was only in test pilot mode, but then I removed it (that was a long time ago). Can this be related?
https://bugzilla.mozilla.org/enter_bug.cgi?product=Firefox&c...