问题
what will be the easiest way to change the resolution on Ec2 Windows server?
I am running Windows 8 R2
Any idea appreciated...:)
回答1:
That setting comes from your client. If you are connecting over remote desktop, go to the display tab and then set the 'display configuration' to the value you want.
You many seed to select the 'show options' link first if your are opening your connection from the mstsc command.
回答2:
If you need to change the actual resolution on the computer itself (if you for example are running a Selenium suite) the answer can be found here:
https://superuser.com/questions/414546/how-do-i-change-the-resolution-of-an-amazon-ec2-windows-machine
回答3:
Several years later, but I've been digging for this answer for at least 2 hours so I thought I'd save someone a headache.
For those of you reading this who are attempting to change the resolution as part of your Selenium Grid, but don't want to do any registry editing and cannot have an insecure solution to changing the resolution (mentioned in the linked superuser article here), you can simply modify the test itself to use set the size of the window.
webDriver.Manage().Window.Size = new Size(1920, 1080);
While those values are hardcoded, you could conceivably set them as an environment variable on your host machine that is running the test so that you can still support multiple hosts with different window sizes.
来源:https://stackoverflow.com/questions/20178032/change-screen-resolution-on-ec2-windows-server-8-r2