Current time: 06-20-2019, 02:50 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Configuring exact viewport size
01-14-2015, 06:52 AM
Post: #1
Configuring exact viewport size
Hi,

I was wondering if it is possible to configure an exact pixel value for the width and height of the viewport when testing in Chrome. It appears that when configuring the test parameters, there is an option under the "Chrome" tag called "Command line".

I did some research as to what command line syntax could be used to adjust viewport/window size, and came across the following commands:

Code:
--app-shell-host-window-size=WxH

--ash-host-window-bounds=WxH

--content-shell-host-window-size=WxH

--window-size=W,H

I tried keeping it simple, and setting --window-size=1100,600, but it appears that the screenshot I get back does not match those dimensions. Also, the waterfall timeline indicates that creatives that should be rendered at those viewport dimensions are, in fact, not being requested or rendered.

Are there additional command lines (or am I using incorrect syntax?) that will achieve the desired results? Viewport width is the real concern here, so anything that can ensure a viewport width greater than 1050px would suffice. Height is more or less irrelevant outside of it being tall[/code] enough to provide a useful screenshot.
Find all posts by this user
Quote this message in a reply
01-14-2015, 07:18 AM
Post: #2
RE: Configuring exact viewport size
You need to use a script with the setViewportSize command: https://sites.google.com/a/webpagetest.o...ewportSize

Otherwise WebPagetest is going to resize the browser no matter how you launch it.
Visit this user's website Find all posts by this user
Quote this message in a reply
01-14-2015, 08:32 AM (This post was last modified: 01-14-2015 08:34 AM by bahamut.)
Post: #3
RE: Configuring exact viewport size
(01-14-2015 07:18 AM)pmeenan Wrote:  You need to use a script with the setViewportSize command: https://sites.google.com/a/webpagetest.o...ewportSize

Otherwise WebPagetest is going to resize the browser no matter how you launch it.

Ok, I think I got it right this time. I included a script consisting of only 2 lines in the textarea provided for scripts:

Code:
navigate    http://url.com
setViewportSize    1100    600

Spaces are tab delineated in the actual script - I'm currently waiting for the results
Find all posts by this user
Quote this message in a reply
01-16-2015, 12:18 AM
Post: #4
RE: Configuring exact viewport size
Flip the order around (though it might still work just because of how the agent code works). You generally want to do all of the set-up before navigating and usually the scripts execute from top-to bottom.
Visit this user's website Find all posts by this user
Quote this message in a reply
01-16-2015, 02:02 AM
Post: #5
RE: Configuring exact viewport size
(01-16-2015 12:18 AM)pmeenan Wrote:  Flip the order around (though it might still work just because of how the agent code works). You generally want to do all of the set-up before navigating and usually the scripts execute from top-to bottom.

Thank you, it looks like the results from tests including the script syntax I included in my last reply did the trick, but it makes sense to carry out viewport resizing before navigating to the target URL, so I will use that technique in future tests.
Find all posts by this user
Quote this message in a reply
08-31-2018, 07:11 PM
Post: #6
RE: Configuring exact viewport size
If we want to run this through the api, like automated schedule webpage test for a size.
How can we use this script ? How to we send the script parameter

For example for tools like speedtracker.org
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)