Skip to content

Capture (not all the page) Screenshot #638

Closed

Description

@andreabisello

with http://robotframework.org/Selenium2Library/Selenium2Library.html#Capture%20Page%20Screenshot we can take screenshot of the full webpage.

i need to take a screenshot of a part of the webpage, for example, a css selector.

how to obtain this?

thanks

Activity

  1. aaltat commented on Aug 23, 2016

    @aaltat
    Contributor

    S2L does not have the functionality but getting screen shot from element is possible by using selenium: http://selenium-python.readthedocs.io/api.html?highlight=screen%20shot#selenium.webdriver.remote.webelement.WebElement.screenshot

    It could be useful to have this functionality also in the S2L. Would you be interested to make a pull request?

  2. emanlove commented on Aug 23, 2016

    @emanlove
    Member

    I would recommend the robotframework-selenium2screenshots library, which you seemed to have found and has this capability already.

    Before installing the selenium2screenshots library you should first install Pillow (which is the current maintained, pip-installable version of PIL or Python Imaging Library). To install Pillow try

    pip install pillow
    

    Then install robotframework-selenium2screenshots with

    pip install robotframework-selenium2screenshots
    
  3. emanlove commented on Aug 23, 2016

    @emanlove
    Member

    @aaltat I would recommend we leave this functionality out of the core Selenium2Library and instead use and expand/contribute to the robotframework-selenium2screenshots library.

  4. aaltat commented on Aug 23, 2016

    @aaltat
    Contributor

    Didn't recall that library, I agree with @emanlove

  5. pekkaklarck commented on Aug 23, 2016

    @pekkaklarck
    Member

    Should the sceenshot lib and other possible companion libraries be mentioned in the README or elsewhere?

  6. aaltat commented on Aug 24, 2016

    @aaltat
    Contributor

    At least somewhere, perhaps readme is a good place.

  7. vasudeoparab commented on Jul 16, 2018

    @vasudeoparab

    Hello,

    How to take whole page screenshot with out scrolling bar in robot framework

  8. jonny64 commented on Nov 14, 2018

    @jonny64

    What about current SeleniumLibrary v3 ?

    • I can't use selenium2screenshots
    • SeleniumLibrary v3 fails to Capture Page Screenshot due to js alert open, out app full of this
  9. aaltat commented on Nov 14, 2018

    @aaltat
    Contributor

    It looks like you have different problem than what is stated in the original description and therefore posting to unrelated issue is not a good idea. Also it looks like you are seeking a support: https://github.com/robotframework/SeleniumLibrary/blob/master/README.rst#support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions