self.wd = webdriver.PhantomJS()
Tuesday, December 30, 2014
Python / Django / Selenium: Set viewport size (window size)
The default viewport size for PhantomJs is like a phone size width. I found plenty of examples of setting the viewport size of the window for Java, C# and Ruby but not much for Python. It's ridiculously simple. Below is an example basically for my future reminder, but here for your enjoyment. This sets the viewport 1280px wide by 720px high.
Subscribe to: Post Comments (Atom)
Post a Comment