Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

resize_window has no effect on save_and_open_screenshot with qt5 #840

Open
ZoharLiran opened this issue Sep 22, 2015 · 14 comments
Open

resize_window has no effect on save_and_open_screenshot with qt5 #840

ZoharLiran opened this issue Sep 22, 2015 · 14 comments
Labels
Milestone

Comments

@ZoharLiran
Copy link

Similar to
#354

I am seeing a similar issue as @datapimp on the same configuration:
Mavericks using Homebrew
qt4 resize_window affects save_and_open_screenshot
qt5 resize_window won't affect save_and_open_screenshot

Any ideas around this since #354 was closed by @jferris ?

@brondavies
Copy link

👍

3 similar comments
@russellsanders
Copy link

👍

@msyesyan
Copy link

👍

@cderong
Copy link

cderong commented Sep 23, 2015

👍

@jferris jferris added this to the 2.0.0 milestone Sep 23, 2015
@jferris jferris added the bug label Sep 23, 2015
@jferris
Copy link
Member

jferris commented Sep 23, 2015

I'll try to revisit this during the 2.0 release. It should be easier then, as we'll no longer have Qt 4 in the mix and we can remove a large amount of support code for deprecated functionality.

@Szarko
Copy link

Szarko commented Sep 23, 2015

👍

@voltechs
Copy link

voltechs commented Nov 6, 2015

Looking forward to that! Can't figure out why my screenshots are so small. :(

@lucascaton
Copy link
Contributor

Any news on this one?

@eschersgirl
Copy link

+1

2 similar comments
@HannesBenson
Copy link

👍

@paveltyk
Copy link

👍

@whitslar
Copy link

Just ran into this. For now I'm monkeypatching Capybara:

module Capybara
  class Session

    def save_screenshot(path = nil, options = {})
      options[:width] = current_window.size[0] unless options[:width]
      options[:height] = current_window.size[1] unless options[:height]

      path = prepare_path(path, 'png')
      driver.save_screenshot(path, options)
      path
    end

  end
end

@andrewculver
Copy link

@whitslar This monkey patch worked perfectly for us. Thanks!

@sfate
Copy link

sfate commented Dec 22, 2017

There is no need to monkey patch capybara.

Here is an instruction from capybara-screenshot readme:

Capybara-webkit defaults to a screenshot size of 1000px by 10px. To specify a custom size, use the following option:

Capybara::Screenshot.webkit_options = { width: 1024, height: 768 }

This issue can be closed AFAIU.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests