Larckov Larckov - 1 year ago 85
Python Question

is there a way to set the window size in

Back in selenium+phantomjs there were a function called set_window_size, and for a project I am working on is very useful, there is a way to do something similar with I have searched the documentation and found nothing about it.

If is any helpful I am working on Arch, with python 3 and with PySide.


Thanks for the answers! I was able to do that with most sites, the problem came when I was trying to take a capture from Google Maps with just don't work. If I use the display option I am able to change the horizontal size, but just that.

At the end, I a used phanthomjs script:

And I did could take a picture of a google maps place. It is strange the behavior of

Thanks in advance!

Answer Source

Use the attribute viewport_size for ghost.Session() it is a tuple to set the initial size, hope this helps

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download