scripting setViewportSize does not work on AMI test agents

Hi Patrick,
I used the with scripting where i was able to add setViewportSize (1920,1080) and i was able to capture bigger web page images for Chrome and Firefox, but when i ran the same script against my own AMI agent on EC2 the captured images sizes remain small/same as the default size.

can you tell me what i have to do on the AMI instance to capture bigger screen shots?

Were you trying Chrome and Firefox on your AMI?

I think the desktop resolution might be set to 1024x768 on the EC2 AMI’s. I have a todo item to make that settable through the user data which would be necessary for larger screen shots. If you set it to a smaller viewport does it work?

Also, you’ll need the agent’s that came with the recently-released 2.7 release in your server’s work/update directory for the AMI’s to pick up the agent code with the right support.

I was trying Firefox on my AMI. It would be great if i can set this through user data.

Thanks for the reply. couple of questions below.

“I think the desktop resolution might be set to 1024x768 on the EC2 AMI’s.” is there a way for me to change this on the AMI manually? ie editing the urlblast.ini or webdriver.ini? files?

Hi Patrick,
is there anyway on the AMI instance i can change the default browser width/height used by modifying some configuration file? Because when i capture the screen shots on your test agent(Dulles:Firefox) i get bigger screen shots if i set the browser height/width via setViewportSize but not against the AMI instance.


The Dulles agents have a desktop resolution set to 1400x1050 (I believe). I configured them manually. The URLBlast code has some logic to make sure that the desktop is configured for at least 1024x768 and 24bpp and if not it will change it to that but the code is hard-coded right now. It’s not hard to change and I’ll try to get to it later this week.

Does setting a SMALLER viewport work? Just checking to make sure you have the correct agent code running and it’s just a desktop size issue. The agents pre-installed on the AMIs are pretty old so it will usually pull an update from your server.



Hi i have the the fallowing

US_East_IE8 (0 minutes)
Tester Version PC EC2 Instance Free Disk (GB) IP Busy? Last Check (minutes) Last Work (minutes)
1 325 PAGEST-IE8 i-6c892e14 6.981 0 0 47
US_East (0 minutes)
Tester Version PC EC2 Instance Free Disk (GB) IP Busy? Last Check (minutes) Last Work (minutes)
1 325 IP-0A02B528 i-0209777a 16.816 1 3 3
2 325 IP-0A02B528 i-18f7b460 17.045 1 0 0
3 325 IP-0A02B528 i-dcc380a4 17.137 1 0 0
4 325 IP-0A02B528 i-eec38096 17.136 1 1 1
US_East_wptdriver (0 minutes)
Tester Version PC EC2 Instance Free Disk (GB) IP Busy? Last Check (minutes) Last Work (minutes)
1 62 IP-0A02B528 i-0209777a 16.816 0 3 50
2 62 IP-0A02B528 i-18f7b460 17.045 0 0 56
3 62 IP-0A02B528 i-dcc380a4 17.137 0 0 51
4 62 IP-0A02B528 i-eec38096 17.136 0 1 55

Also having problems to set the view port size on EC2 AMI. (ami-8b2c2fff eu-west)

My script / testing on chrome (36):

setUserAgent	Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53
setViewportSize 320 568

The useragent string is recognized correctly (a mobile website is delivered) but the viewport size did not match…
Any news on this issue?

I have same problem with my private instance agents (IE9, wptdriver).

setViewportSize 1000 800

just does not set a viewport size.

it works correctly on public agents:

Maybe try updating to the latest agent code on your server so the AMIs get the latest code:

Here is the same test with a 400x800 viewport on EC2 using the public instance (AMI should be the same):

I always use newest version of wptdriver (now - 200). This problem occurs regardless I run test on IE, Chrome of FF. Tested it with urlblast also and have the same problem.

It is not a serious issue for me. I am just letting know that there is a potential problem with it. :slight_smile:

Parameters for setViewportSize have to be placed after “tab” character. Other WPT statements work correctly both with spaces or tabs so this can be a trap.