简体   繁体   中英

How to set screen resolution in PhantomJS with python

How to set screen resolution in PhantomJS? I need to change exactly screen resolution not window size.

Window size != screen resolution.

Faced the similar situation a couple of days ago. Browsed through a lot of discussion forums/discussions. The one suggestion I got regarding window resizing is this link , you have to

beforeEach(function() { browser.driver.manage().window().setSize(1280, 1024); });

Having said that, this solution didn't serve my purpose. I had to perform some tricky measures.

Let me know if it works else I will suggest you more options.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM