scripting setViewportSize does not work on AMI test agents

Hi Patrick,
I used the webpagetest.org 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?
Thanks.

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.
[hr]

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.

thanks
Suren

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.

Thanks,

-Pat

Hi i have the the fallowing
[version]
ver=325

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 107.22.109.136 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 50.17.21.15 1 3 3
2 325 IP-0A02B528 i-18f7b460 17.045 23.22.147.24 1 0 0
3 325 IP-0A02B528 i-dcc380a4 17.137 23.20.81.13 1 0 0
4 325 IP-0A02B528 i-eec38096 17.136 67.202.8.188 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 50.17.21.15 0 3 50
2 62 IP-0A02B528 i-18f7b460 17.045 23.22.147.24 0 0 56
3 62 IP-0A02B528 i-dcc380a4 17.137 23.20.81.13 0 0 51
4 62 IP-0A02B528 i-eec38096 17.136 67.202.8.188 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
navigate http://www.example.com

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).

Script
setViewportSize 1000 800
navigate http://www.google.co

just does not set a viewport size.

it works correctly on public agents: http://www.webpagetest.org/result/150209_PH_2c4e79a78150c0ad5b66595a631e3616/

Maybe try updating to the latest agent code on your server so the AMIs get the latest code:https://sites.google.com/a/webpagetest.org/docs/private-instances#TOC-Updating-Test-Agents

Here is the same test with a 400x800 viewport on EC2 using the public instance (AMI should be the same): http://www.webpagetest.org/result/150209_E7_cafabd085f58170737a52e256558f096/

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.