Unable to capture screenshot of the webpage

Options
Anony123
Anony123 Registered Posts: 3

Hi Team,

I am trying to capture screenshot of the complete webpage from dataiku webapp built with dash - python at backend. Whenever user clicks on save button, a snapshot of the webpage should be captured and saved into their local. This webapp is a common one for many users and everytime if any user saves it, a snapshot should download to their local.

I tried with different packages such as selenium webdriver, wkhtmltopdf, wkhtmltoimage, pyautogui, requests and some other but throwing an error as connectionError: (‘Connection aborted.’, ConnectionResetError(104, ‘connection reset by peer’))

based on the above error, I can understand that it is looking for webdriver installed path in local. But this path will differ from user to user. Hence, I want a generic way to capture screenshot for any user in any browser and save it to their local.
Can you help me how to proceed for this?


Operating system used: Windows

Tagged:

Answers

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 1,757 Neuron
    Options

    What are you really trying to achieve? Describe your objective not how you think it could be achieved. Maybe there is a better way of achieving what you wanted to achieve.

  • Anony123
    Anony123 Registered Posts: 3
    Options

    When user clicks on submit button in webapp, a screenshot of the entire webpage should be captured and saved into user’s local computer. It should not limited to chrome or internet explorer browser, it should be a generic one.

    webapp is built on Python- Dash

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 1,757 Neuron
    Options

    That's probably not your requirement but one way you could solve it. Perhaps you want to document what the user is doing or you want to download some graphics from a website. But either way what you want to do is simply not possible. This has nothing to with Dataiku, Python or Dash, it's just not safe for a website to be able to trigger a client side action like taking a screen shot and being able to save local files without major security implications.

    If you can share your actual requirement we can see if there is a better way of achieving wehat you want. Otherwise my advice will be to use any of the myriad of client side apps that can take screen shots and save them on the client computer.

Setup Info
    Tags
      Help me…