Hacker News new | ask | show | jobs
by odabaxok 3018 days ago
A little OT, but how can I enable/use the Screenshots feature? I cannot find it.
5 comments

Hey, Screenshots person here...this is a new one to me.

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 :)

Right click -> Take a Screenshot
Also, there are three dots next to the address bar, where it can be found.
If you open that menu with the three dots, then control-click on the Screenshots menu item, you can add a Screenshot button to the address bar.
Is there a way to trigger a full screen screenshot via Selenium/WebDriver? (not a partial/window screenshot - that I can do)
Firefox has a screenshot feature that I'd like to trigger from Selenium, which is by going through the "..." icon in the URL bar which opens up a menu with its last item being "Take a screenshot" (and then you can select a full page screenshot).

Is there a way to programmatically trigger this feature or sequence?

If I'm understanding correctly, could you just select the body tag and screenshot that? In Selenium Python that'd be:

    # driver is a Firefox driver
    body = driver.find_element_by_tag_name('body')
    screenshot = body.screenshot_as_base64 # png bytes
Just tried this - doesn't seem to work:

- a lot of (visible) elements are missing

- the screenshot is still cropped to whatever viewport is used

Definitely just speculating here, but there is a `driver.save_screenshot(path)` method that would probably be worth trying.

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')
On the right-hand side of the location bar, there's a Page actions menu (the 3 dots) which includes taking a screenshot.
Did screenshots somehow get disabled? In about:config, check the value of the extensions.screenshots.disabled pref.
No it was never disabled. Also, I have tried to disable it and enable it again and restart the browser and similar things...
Weird. Maybe try filing a bug to see if someone who works on that feature has any other ideas.

https://bugzilla.mozilla.org/enter_bug.cgi?product=Firefox&c...

Are you sure you've updated your browser? I have the option in that menu.
Sure, I have. This feature is there for a long time as of my understanding (since Quantum, maybe?).

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://postimg.org/image/gw4g2vk3h/

I think that's been around for a while, right? It's under my right-click menu.
I cannot see it there either.

https://postimg.org/image/dexsmbvp9/

It's the lowest item in the context menu when you rightclick anywhere on a website.